Use memory for storage?
It would be cool if an option existed to use memory to store the router state, as a substitute for history.pushState. Any ideas for how this could be accomplished? I'm happy to submit a PR if you think this is worthwhile.
That can be handled by using the router stream.
For example:
import { router } from '@riotjs/route'
router.on.value(cacheTheRoutes)
The router object is an erre sream so you should be able to hook your callbacks using the erre API
Agreed, but how do you tell the Riot components to use that instead?
Just following up to see if there is an option for the riot HOC route or router to use memory for storage rather than history.pushState. Is there an example of this somewhere? If it's possible, I'd like to work on this.
I am not sure if I understand your question but if you want to handle the route links and store them by yourself you might have a look at this example https://plnkr.co/edit/syfuyLhXNoWlWqZ0 If you want to use a memory router similar to the react router, that's not yet possible
The memory link example you sent me is quite useful, but I am hoping for a more plug-and-play solution that automatically listens for <a> tags being clicked -- a bit like React router.
If you think this is worthwhile, I would be happy to give it a try and submit a PR. I can foresee a few changes to dom.js
@bminer yeah sure I accept PRs. Let me see what you mean and if the code will still be manageable I will be happy to merge it. Thank you