I created a guide for getting started with Meteor 1.3, React, and FlowRouter.
The main reason was that I noticed that while there is a tutorial on using React with Meteor, the more advanced Todos app, which has routing, uses Blaze.
So I wrote up a guide. It ended up being a bit longer than I had planned and is probably more useful for beginners, but perhaps more advanced devs will find a nugget or two in there.
Nice article, Iām just planning to use 1.3 with React in my next project. I am just wondering about lazy loading. In your example you have loaded all routes via import in main.js - isnāt it an anti pattern for lazy loading? Iām just wondering if Meteor would load all files I am using if I import all routes on the beginning in main.js
And all files will be transferred to the client at once and not if he visits the specific route? So we have the same transfering behavior like in 1.2? I am just wondering because the blog post says something different.
As someone learning React, Meteor and ES2015 having just got to grips with 1.2 and Blaze. These kind of walk-throughs complement the Meteor Guide extremely well.
@sashko - maybe Iām reading this response out of context, but could you clarify what you mean by āMeteor always loads all your files immediately.ā
I thought the whole point of the āimportsā directory is that files in that directory are not loaded immediately.
No the point is that you can control which files are loaded, and in which order. And that opens up a path to code splitting and asynchronous loading down the road, since such a system is basically impossible without explicit imports.
Itās not completely unchanged, to avoid loading React x2 you have to use React mounter instead of ReactLayout which depends on the meteor package (you can also use React router)
EDIT: you can now also just update your react meteor package (thanks @sashko!)