Description
I think we need to discuss how to best handle the React issue with Meteor 1.3. Currently we have the option to render the Blaze components into a React layout by specifying 'blaze-to-react' (a PR which I actually submitted).
Currently, by specifying this rendering option, we have the following requirements:
- The MDG React package must be available.
- The ReactLayout package must be available.
- The blaze-to-react package must be available. This also depends on the MDG React package.
With Meteor 1.3, a much better approach is to include React as a local Npm package. In that case we should no longer use ReactLayout, but instead use the ReactMounter Npm package. Also, we have to find/create an alternative to blaze-to-react
which doesn't depend on the MDG React.
So, with hindsight, I wish I'd added React support differently to make it easier to add other renderers. My suggestion would be the following:
We should remove the blaze-to-react
option from the FlowRouting package, and replace it with a generic custom
option. The user would then be able to provide the rendering code via a defined protocol.
This would allow us to provide code that renders using React/ReactLayout as we do now, or using Npm-based React the new way. It would also make it easy to add support for things like Angular if there's ever a need. We could provide these extra rendering options as optional packages, or show code example in the docs.
Another option would be to add another render type (blaze-to-npm-react
) to the existing package.
I'm not sure what the best way to go is.
For my part, I'm currently using a custom version of FlowRouting that's using React Mounter + Npm React + a custom version of blaze-to-react
, but it's not a good long term solution.