FlowRouter 4.0 and Future of Routing in Meteor

I hope everyone is looking for wether MDG is building a router or take an existing router into the core.

We already have the answer.

FlowRouter is featured on the Meteor Guide. So it’s safe to assume FlowRouter will be the router of choice in Meteor.

So, I thought this is a good time to explain about the next major version: Flow Router 4.0

15 Likes

good write up like always !
i cant wait for flow router 4!

but what happend to v3 ? :smile:

4 Likes

I believe next should be 3.11 and then 95. :wink:

8 Likes

Sounds great!
When will it work with Blaze?
Thanks!

FlowRouter SSR caries 3.x versions. So, in the repo I can’t tag for 3.x again. So 4.x was the option :slight_smile:

I’m curious why 6.0 is billed as the next version? What about 5.0?

2 Likes

It like 5.x to be as the development version. Anyway, it’s too early for exact details.

2 Likes

Is MDG actually becoming opinionated on the choice of router, or is that just the personal preference of the individual who wrote the guide article? If they want to attract the legion of React fans to satisfy investors and grow adoption, I don’t quite see how that fits.

I’m not exactly sure what you mean. Are you saying we should all use React Router?

Just believe Meteor should be router agnostic.

Just like with templating. In the docs there are examples of using Blaze, React and AngularJS. From what I can tell that degree of freedom didn’t always exist.

1 Like

Yes, and it always will be! That’s not the point of the Meteor Guide. The point of the guide is to have an opinion about everything, for people who don’t want to have to make those decisions themselves. However, the framework itself will always be much more flexible. And in the guide we can also mention places where that flexibility exists. For example, at the top of the routing guide it says Flow Router is just one of the options, and you can use whatever other router you want, and the patterns described in the guide can still apply.

2 Likes

I just read the feature list for flow router 4.0 and, if I get this correctly, Blaze is not fully supported for all its features? Blaze is still a core component of the meteor stack that many people really like, it would be great if the “official” meteor router would support it 100%.

Are you referring to server side rendering? In that case, Blaze itself doesn’t support it well, so it might not be possible. Are there any other features missing?

@tomsp FR 4.0 is SSR focused release. It does not remove Blaze support. What’s happening is, SSR support will be enabled for React and for Blaze it’s just like 2.0.

Even with Blaze, you could enjoy server side redirects, and meta tags support.

@arunoda thanks, that’s good news. theoretically, what would need to be done to make this happen also for Blaze?

There is a quite a bit of work to do. Some of them are.

  • Make templates available on the server
  • Execute templates on the server (we’ve partially implemented this)
  • Merge server generated templates and client generated templates

This is just the basics, there might be more to do.

@sashko nope, just the SSR I guess. but as it seems that would be quite a bit of work.

Understandable. Though the only option mentioned explicitly is IronRouter, which from what I can tell has been somewhat deprecated due to no longer being maintained. If the official guide is going to be opinionated, perhaps include some discussion as to why FlowRouter was chosen over the other options.

RenderToString(); RenderToStaticMarkup();

p.s. ReactRouter supports SSR.

Will fast-render still be supported even though subscription registration is being removed from the router? If so, how does the router know which publications to use to send the initial data load?

1 Like

I’m interested in this as well!