Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meteor 1.3 + React Discussion #33

Open
timothyarmes opened this issue Mar 18, 2016 · 4 comments
Open

Meteor 1.3 + React Discussion #33

timothyarmes opened this issue Mar 18, 2016 · 4 comments

Comments

@timothyarmes
Copy link
Contributor

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.

@lmachens
Copy link

lmachens commented Oct 31, 2016

I like the idea to add a generic custom option. Take a look at my pull request #53.
I didn't remove the blaze-to-react option for backwards compatibility.

@vladbalan
Copy link

What is the status for this? Are there any plans to merge #53 as an official solution?

@derwaldgeist
Copy link

derwaldgeist commented Aug 21, 2017

Ping. Eight months later and no response to this? Will useraccounts support React, or is there an alternative for React-based apps? I have a mix of React and Blaze components and would like to use FlowRouter in combination with react-mounter or ReactRouter directly. But useraccounts are a show-stopper here. :-/

Edit: Just had a look at #53. Seems to make pretty much sense. Is this package still maintained, or why is #53 still waiting for review?

@derwaldgeist
Copy link

Just found this: https://github.com/studiointeract/accounts-ui/
Seems to be maintained - and is supporting React.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants