maisano / react-router-transition

painless transitions built for react-router, powered by react-motion
http://maisano.github.io/react-router-transition/
MIT License
2.59k stars 138 forks source link

dynamic routing/code splitting? #33

Closed ngocketit closed 7 years ago

ngocketit commented 7 years ago

Does it work with react-router dynamic routing/code splitting?

maisano commented 7 years ago

hi @ngocketit. there shouldn't be any reason it wouldn't work w/code-splitting, so long as the container has a RouteTransition. all this package does is provide animation hooks for mounting/unmounting components.

going to close this, feel free to reopen if you're unable to get it working.

ngocketit commented 7 years ago

Thanks @maisano! I tried and it indeed works. The only problem is that the new view usually comes blank for a while until the async data is loaded. This probably can be mitigated with a simple spinner.

maisano commented 7 years ago

@ngocketit great! glad that worked out. feel free to submit a pr with an example if you get it working and want to share that. no worries if not tho!