-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide more extensive example #4
Comments
I made this driver having only experimented router5 at a basic level, but haven't had a chance to go deeper due to a deadline with a client's website, so the best guidance I can offer is that I tried to simply wrap what router5 had to offer, while segregating asynchronous methods from synchronous methods to try and work them into cycle's source/sink driver pattern. Beyond that, I haven't had a chance to think about it more deeply, so I'm pretty open to community input on any architectural issues with the code as it currently stands. That all said, my preliminary thoughts on the matter are that, first of all, router5 exposes 3 primary listener methods, and those are all exposed by the driver, so you can listen to any of them depending on your needs. If you want to react to changes to subnodes, it would be trivial to call I've just updated the driver to use router5 version 0.5.0, and exposed the |
I see. Thank you for explanation. |
No worries, let me know if you have any further thoughts after you've used it a bit. |
Whoops, didn't mean to close this. |
I found one example which uses this library: https://github.com/basham/cycle-demo/blob/router5/src/main.js
There is such search of route handler in the plain
Array
:Which seems not correct as routes can be nested and the thing that we need to look for handler kinda undermines the router purpose.
It would be great to know how do you see an idiomatic way to react on route changes.
router.addListener()
line makes me stuck because Router5 examples are heavily bound on Listeners and we provide no listeners here. Listener argument isn't optional in the original Router5 API and it's kinda hard to understand what to do next. My first thought was that we need to provide some listener function there to start, but then I found an example above...The text was updated successfully, but these errors were encountered: