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

Breaks with Meteor 1.3 and FlowRouter when using npm react #32

Open
robinnewhouse opened this issue Feb 28, 2016 · 10 comments
Open

Breaks with Meteor 1.3 and FlowRouter when using npm react #32

robinnewhouse opened this issue Feb 28, 2016 · 10 comments

Comments

@robinnewhouse
Copy link

I followed the tutorial at https://voice.kadira.io/getting-started-with-meteor-1-3-and-react-15e071e41cd1#.nftvsfia4 on creating an app that no longer depends on meteor's react but allows for installation of react and react-dom through npm. Now my useraccounts throws an error as it appears to have ReactLayout as an explicit dependency

Perhaps you could use the "react mounter" npm package that flow router now uses. https://github.com/kadirahq/react-mounter

@jshimko
Copy link
Member

jshimko commented Feb 29, 2016

I haven't personally used react mounter yet. Is that going to work with Meteor 1.2? If not, I think we'll need to wait until 1.3 is official to make that change.

Also, we're always open to pull requests. ;)

@robinnewhouse
Copy link
Author

Thanks for the reply. I suppose it does make sense to stick with the stable version at the moment.
I'm still pretty new to this whole landscape of web development, but if I manage to modify something I think worth pulling I'll make a request.

@ziarno
Copy link

ziarno commented Mar 28, 2016

👍 please add support for react-mounter! :)

@nickeday
Copy link

nickeday commented Apr 1, 2016

+1 for supporting react-mounter please! I'm updating my app to Meteor 1.3 and have just encountered this same issue.

@jshimko
Copy link
Member

jshimko commented Apr 1, 2016

Pull requests welcome. ;)

@diegonc
Copy link

diegonc commented Jul 13, 2016

Hi

I'm going to try to use useraccounts with React and Flow Routing. So I created PR #47 (untested) to fix this issue. @jshimko, it would be great if you could review it and comment on any foreseeable problem.

As my project progresses to a functional state (currently it's blank :) I will eventually test the PR and report back.

Cheers!

@diegonc
Copy link

diegonc commented Jul 13, 2016

Well, it didn't work. The blaze-to-react version in atmosphere brings react and conflicts with the one installed through NPM.

@diegonc
Copy link

diegonc commented Jul 13, 2016

Ok, now it works. I replaced gwendall:blaze-to-react with gadicc:blaze-react-component; so it seems to be an issue in the published version of blaze to react.

Furthermore, I'm not sure whether it remains backwards compatible because I also had to use ecmascript for require; nor I can think of a way to allow prior versions of Meteor :(

@isAlmogK
Copy link

Has this been fixed? Wanted to know if it's possible to use accounts with react?

@lmachens
Copy link

If you want to use react-mounter or don't like any dependencies with atmosphere packages -> try out #53. There is a discussion about a new layout type custom #33 .

Example:

import { mount } from 'react-mounter';

AccountsTemplates.configure({
  defaultLayoutType: 'custom',
  defaultCustomRender: (layoutTemplate, layoutRegions) => {
    mount(layoutTemplate, layoutRegions);
  },
  defaultLayout: MainLayout,
  defaultLayoutRegions: {},
  defaultContentRegion: 'main'
});

AccountsTemplates.configureRoute('signUp', {
    name: 'signUp',
    path: '/sign-up',
    template: <SignUp />
});

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

7 participants