Closed iherem closed 1 year ago
Naive question perhaps, but why can’t the locale be part of the pattern?
Actually, I used it with my silly case. I don't know how other people do. for example: I have the base route /landing if i go straight to url /uk/landing or /ph/landing the content is changing depend on the route country. but the metadata can be everything you want to send to the server
but the metadata can be everything you want to send to the server
What part is sending stuff to the server? I'm a little confused 🙂
Also, you should update documentation to reflect these changes, and bump the library minor version according to https://semver.org/.
When I can't specify additional values and send them to custom handlers. Then I add the metadata into the constuctor to specify the value of what will be added to the custom handler.
Suppose I want to specify the locale of route
routes.add({ name: 'home', pattern: '/home', page: 'home', metadata: { locale: 'en' } })
The custom handlers receive the metadata
and the simple case if you want to specify some of route for cache just add the
{ cache: true }
in the metadatareference issue #127