4 ms·
Thanks to the Webpack people for focusing on ease of use, ease of migration and avoiding breaking changes. react-router has recent gone from version 3 to versi
by hoodoof 9y ago
Thanks to the Webpack people for focusing on ease of use, ease of migration and avoiding breaking changes.
react-router has recent gone from version 3 to version 4, which is essentially a completely new and almost unrelated piece of software to V3 and requires a major rearchitecture of your application to make the transition. In effect it is one big breaking change.
- aocvr 9y agoUpgrading from 3 to 4 is not required. Version 3 is still maintained. It's not ideal since there will probably be no future major 3 versions, but no one is forced to make a 'big breaking change' strictly speaking. > We intend to keep supporting the 3.x branch indefinitely (published separately on npm to aid in migration), although there will likely not be any future major versions based on that code. 4.0 is the future, but we won't leave you hanging if you want to stick with 2.x/3.x. https://github.com/ReactTraining/react-router/releases/tag/v4.0.0-0 https://github.com/ReactTraining/react-router/releases/tag/v... Previously discussed here: https://news.ycombinator.com/item?id=12511419 https://news.ycombinator.com/item?id=12511419
- tchow 9y ago4.0 is a regression imo. The docs say that if you do server side rendering with code splitting then 'God Speed' (their words not mine). I don't see the benefit of switching if v3 allowed me to ssr and code split while v4 doesn't allow me to do both. From the user pov it went from instantly displayed page with minimal js required to choosing one of those options. What benefits could exist that supercede giving the user the best possible experience? (Genuine question). I can't imagine huge speed gains going from one page to the next from this change and indeed changing pages in SPAs are essentially instant. So what could possibly be better that makes it worth getting rid of ssr and code splitting? Imo I won't be using react-router in future products because they are too fickle with their codebase.
- jazoom 9y agoThis was the madness that finally pushed me over the edge and towards Vue about 8 months ago. No regrets here!
- finchisko 9y agoI'm huge fan of React Router v4. It works great with webpack and it's worth upgrading. Forget about static router configuration in one component. With v4 you can do router delegation, when router component can delegate routing to another. This allows you to split your app into chunks in before impossible ways with webpack.
- ttt111222333 9y agoWhat are you even talking about? Can you provide some example?