4 ms·
Why did the author write "RIP IronRouter"?
by chm 11y ago
Why did the author write "RIP IronRouter"?
- sergiotapia 11y agoLots of smarter people than myself recommend not having reactivity in your router. IronRouter has that in spades. The logic is that it's harder to debug your router if you have reactivity. FlowRouter is better in that regard because it's 'dumb'. I find it easier to reason about my code/state by having a dumb router and letting my templates decide what to render.
- nstart 11y agoCan confirm the statement of reactivity in router being a bad thing. Route reloads because of new data can be surprisingly expensive especially when you have a large data set being shown in one place (eg: task list). Unless you are really being careful and watching out for how you put elements into your router (when using iron router) you can suddenly have an edit on one item causing a full reload of the entire view which in turn ends up reloading all the items. It's avoidable for sure, but we all know that it's better to have the default behaviour be the more rational one.
- timfletcher 11y agoDevelopment on ironrouter stagnated a long time ago. It has almost 300 open issues and the last commit was in June. FlowRouter by Meteorhacks/Kadira (one of the most active community members) was released about 3 months ago as a very slimmed down router. It's been quickly adopted, is well maintained and works excellently with alternate front-end like React.
- dpacmittal 11y agoIronRouter tries to be a lot more thing than just a router. It had controllers, which are basically encapsulates your data for a specific route. There are things which a router shouldn't really bother with. Having said that, you can still use IronRouter as just a router and not use the extra bells and whistles that comes with it. I'm still using it in one of my projects and haven't had any issues, perhaps because I'm not using more advanced features provided by it.
- sgrove 11y agoTelescope recently switched away from IronRouter to FlowRouter for a number of reasons, and discussed it in the changelog episode here: https://www.youtube.com/watch?v=itVZ1Md5xMI&feature=youtu.be https://www.youtube.com/watch?v=itVZ1Md5xMI&feature=youtu.be - @sgdesign does a fantastic job comparing/contrasting and explaining the motivation for the switch away from IronRouter.
- chm 11y agoThanks, I'll be watching this video. I'm working on a Meteor app in my spare time but had never heard of FlowRouter.