FlowRouter 4.0 and Future of Routing in Meteor


#1

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


What a best alternative for FlowRouter now after lost arunoda and kadira?
#2

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

but what happend to v3 ? :smile:


#3

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


#4

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


#5

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:


#6

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


#7

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


#8

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.


#9

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


#10

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.


#11

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.


#12

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%.


#13

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?


#14

@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.


#15

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


#16

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.


#17

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


#18

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.


#19

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?


#20

I’m interested in this as well!