frontarm / navi

🧭 Declarative, asynchronous routing for React.
https://frontarm.com/navi/
MIT License
2.07k stars 71 forks source link

Missing Segment type in docs for a custom matcher #135

Open markjaniczak opened 5 years ago

markjaniczak commented 5 years ago

I'm struggling to understand how to make a custom matcher following this doc:

https://frontarm.com/navi/en/reference/matchers/#custom-matchers

The doc above talks about needing to return an array of segment objects but I can't see segments in the Types doc:

https://frontarm.com/navi/en/reference/data-types/#segment

jamesknelson commented 5 years ago

Oh dear, that documentation seems to be quite out of date :-/

Segments are now called Chunks. I probably should just remove this from the documentation though, as custom matchers are likely to change significantly in a future version.

markjaniczak commented 5 years ago

Ah ok - I'll keep an eye out for future updates. I managed to workaround the issue for now.

Are there any plans to allow for custom chunk types? An application of that would be for making a breadcrumb component that could build the path using all chunks in the current route of a custom type.

jamesknelson commented 5 years ago

Are there any plans to allow for custom chunk types?

I've got plans for something like this, although it's probably going to take a while to get around to it.