I want to try React in one of my projects built with meteor+blaze+flowRouter. How can i properly migrate to React?
Now i have two layouts (main and admin) rendered using BlazeLayout. All subscriptions are made in templates only. And of course spiderable package.
So i want to change user part of frontend first (and to use ssr). Can BlazeLayout and ReactLayout coexist in “hybrid mode”? For example now i render personel with BlazeLayout.render('mainLayout', {main: 'personel'});, but how can i render it, if my mainLayout become React component?
Is it possible to migrate one view after another, or i need to rewrite all at once?
Blaze and React can coexist perfectly. In fact, if you look at the official MDG React tutorial they do just that with the Accounts.ui package. They wrap the blaze template within a React component.
Checkout this video on migrating to React. In a nutshell you start at the leaf nodes and then pass the blaze data down into it. Then just keep working upward until you hit the router and at that point you can use react-layout to render the component.
You can also use a helper like this or the more simple way is to just use React.render in the blaze onRender function.