Documentation lacks a good overview.
See original GitHub issueI’m reading the documentation and it’s hard for me to understand where would router5 go in my app. In the simplest form, I understand the router as something that maps urls to states. But the introduction doesn’t talk about this. Let me quote the very first sentence:
The main idea behind router5 is to treat routes like any other application data / state.
Okay, cool, I expect a nice pure functional router. But then in another place I read that calling .start()
will bind the router to the browser state. In my understanding, this contradicts the “main idea”!
Then I see:
With router5 it is reversed: rather than the router updating the view, it is up to the view to listen / bind / subscribe to route changes in order to update itself.
So I suppose that the router has some internal state, and I can push URLs and listen to state changes. Right?
I try to be constructive, and not just complain about the docs I didn’t write. But the introduction would really, really benefit from a “big picture” overview. This can be one paragraph, or an example with 10 lines of code, that would explain the Router5’s place within an app. (e.g. should my UI create a router, or will the router create my UI?)
Maybe I’ll even prepare one when I understand it better. 😉
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (9 by maintainers)
@jwoudenberg API reference is available again
I’m going to bring it back, I’ve ran out of time and went for releasing 4.0.0 anyway (and not delay it any further).