Current routers?


#1

Jumping back into Meteor and i’m shopping for a router.

Previously, iron router and flow router were really the only go to options. Are there any new ones I should look at? Which is now recommended?

I noticed that the Meteor guide uses Flow Router, so i’ve seen it touted as the “official” router for Meteor, which I found strange considering iron router seems to be much more widespread, and has nearly 10x as many downloads on atmosphere.

My main interests in a router are easy to integrate and simple to use. I haven’t really used routers extensively before so those are my main priorities.


#2

If you’re starting a new Blaze based application use Flow Router. Iron Router is no longer actively developed / maintained, and Flow Router is lighter weight / simpler to use (see the Difference with Iron Router section of the Flow Router docs for more info).

If you’re planning on using React instead of Blaze, I’d recommend going with React Router. You can use Flow Router with React, but React Router is being used/developed/maintained by the much larger React community, specifically for use with React. That being said I’ve had success using both Flow Router and React Router on Meteor + React projects, so maybe give them both a shot to see which one you like more.


#3

Cool, I dont have experience with React (yet) and was previously looking into Flow Router, so will give it a go. Thanks.


#4

I would be keen to know what the main differentiation points are between FlowRouter and ReactRouter for Meteor devs.


#5

They both definitely work well with Meteor, but I’ve mostly switched over to using React Router for new Meteor + React projects. From a technical standpoint they both do a great job, and have some advantages/disadvantages over each other. While I do find React Router to be more lightweight, my reasons for preferring its use these days aren’t necessarily technical:

  • Most of the React based tutorials, books, blog posts, screencasts, etc. out there use React Router for routing, making it quite easy to get up to speed with. This is of course due to the fact that the React community is much larger than the Meteor community (but we’re OBVIOUSLY happier thanks to Meteor :slight_smile:). Actually, even the react branch of the Meteor Guide’s reference app uses React Router (I’m a bit tongue in cheek here - there is a reason why MDG went with this approach).
  • Flow Router is supported by the great @arunoda and his team, along with a few community members, but its development/maintenance/progress is lagging a bit. I’m in no way putting any blame for this on the Flow Router devs as we can (and should) all be helping the Flow Router team out. It’s just that the React Router team and contributors are quite significantly larger. PR’s are created and merged pretty quickly.
  • React Router knowledge is transferable outside of Meteor. I know a lot of people have said this comes in handy when moving existing apps away from Meteor, but the reverse is also true. This has come in handy for me a few times when porting non-Meteor based React apps over to Meteor apps.
  • When working with JS devs coming from non-Meteor backgrounds, there’s a great chance they already understand how to use React Router. This of course isn’t really a deal breaker, but I’m continuously amazed at how the React ecosystem has taken the JS world by storm …

If you’re interested in more community opinions on Flow Router vs React Router, check out this forum thread (be warned though - talk of Phoenix sneaks in and consumes half the thread! :slight_smile: ).


#6

Know any good server-side routers?

Even if it’s not a router, I’m looking for something that support webhooks and endpoints.