-
Notifications
You must be signed in to change notification settings - Fork 2
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
How do you re-render? #1
Comments
Got it working! New version of react-router is much easier to work with than the last. I'd recommend updating this repo with something canonical. |
You don't, yet ;) just started looking into this myself, and things seem to have changed remix-run/react-router#28 PRs welcome! |
Alright, nice. Had a go somewhat similar to yours, and that seems to work quite nicely! Though personally I think I'd prefer the previous versions' approach by passing individual props to different Currently all routes would have access to one shared state. Making things work by splitting the state up seem unnecessarily difficult, and needs some wrapper react component that closes over a cursor, much like with your 'page()' function, but it seems we'll have to live with that:) Can multiple routers coexist within a single page? |
Does this really work like you'd intend? If you pass
https://gist.github.com/seanhess/2925452e7f0bf29865d2#file-omni-react-js-L86 all your components have |
I don't know how else to do it. Are there other options? On Wed Nov 26 2014 at 12:08:33 PM Torgeir Thoresen notifications@github.com
|
Oh, you're right, I didn't think this through. Here's an updated example with different cursors (that could reside in different immstructs), and passing route-data as statics https://github.com/omniscientjs/react-router-omniscient-example/blob/master/index.js |
omniscient/issues/25 moved here:
That was merely an example to show it's possilble pass different cursors to different components based on what's rendered. Here's how react-router suggest you handle async data. A similar approach ought to work with async/cursors as well |
Did we ever conclude this? Closable? cc @torgeir |
Well, we got the example repo. It's clumsy, to say the least, with the latest react router api not taking handler props, could prob need more experimentation |
I'm getting this all working together right now, thanks for the example!
How do you re-render when a immstruct changes with this integration?
Thanks,
~sean
The text was updated successfully, but these errors were encountered: