You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I based the code off @petehunt's cjs version from #1 with a couple of things to note that are different:
I am using the browserify module loader as the module cache and try requiring the base component on componentWillMount if that fails it will then load in the bundle, this should also in theory allow for synchronous loading of the components when rendering on the server. https://github.com/pieterv/react-partial-app/blob/master/partial-app.js#L58
The browserify bundling setup isn't very good at the moment as you have to manually specify what modules go in what bundle, we should be able to automate this in the near future with browserify's factor-bundle plugin but there are a few bugs blocking this.
I really like the direction this router is going, i'm looking forward to using it in my projects!
The text was updated successfully, but these errors were encountered:
Hey @pieterv! Thanks for sharing your example code. At this point we have some async transition hooks (undocumented) that you can put on your component classes willTransitionTo and willTransitionFrom that are called when your transitioning to/from your component. I think the best place to load the components you need from the server may be in willTransitionTo instead of componentWillMount.
Either way, nice work! Is there something here you wanted us to merge?
Hey @mjackson, the willTransition* hooks sound really useful, i will look into that!
I left the issue open as i was going to update it when i had a nicer solution for the browserify bundling issues, but it looks like the bug fixes i was waiting on have stalled so will close this now and look at doing a PR with an example if i find a solid solution.
Hey!
I am very impressed by your partial app loading example and after some playing i got it going with browserify, i thought you might be interested :)
https://github.com/pieterv/react-partial-app
I based the code off @petehunt's cjs version from #1 with a couple of things to note that are different:
I really like the direction this router is going, i'm looking forward to using it in my projects!
The text was updated successfully, but these errors were encountered: