Meteor 1.3 and React-dependend Atmopshere packages

So according to the guide we’re not supposed to use React from atmosphere, but from npm.

But what about packages that depend on React from Atmosphere - can I still use those in my app? Will there be no conflict if I use npm-react and those packages use atmopshere-react?

In Meteor 1.3 those will work out of the box. The only downside is you will have to install some NPM packages:

Essentially the main downside is that you will be loading these React addons even if you aren’t using them.

1 Like

@zlarno - we’ll release a new version of the react Atmosphere package (0.14.3_2) soon after the 1.3 release.

It will use a npm React that you install rather than bundling it’s own, and should be a drop-in replacement for the earlier react packages as a dependency of 3rd party Atmosphere packages.

You can use the beta right now (0.14.3-2-beta.16) although I’m not quite sure how the version resolver will treat it in terms of 3rd party packages (with the odd name it has).

Thank you for the replies! I think it’s worth stressing out in the guide that you must load those react extensions even if you’re not using them (that wasn’t clear to me after reading the guide).
However, I’m getting an error connected with loading multiple versions of React:

addComponentAsRefTo(…): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component’s render method, or you have multiple copies of React loaded

there is also a link to an explanation for this error. I made sure the error isn’t caused by any refs - after removing packages that depend on atmosphere-react the error is gone.
Atmosphere packages with react dependencies in my project are:

  • kadira:react-layout
  • useraccounts:flow-routing (dependand on kadira:react-layout)
  • universe:i18n

I have confirmed that the error is caused by using kadira:react-layout. I guess I have to remove it and useraccounts:flow-routing from my project…

If using NPM React, you need to use the NPM react-mounter package instead of react-layout

I see, therefore I cannot use useraccounts:flow-routing which uses kadira:react-layout

is 1.3 will officially use NPM as the manager? Why don’t MDG annouce and make it official?

Note that Meteor 1.3 is not done being released yet, so anything I said with “will happen in Meteor 1.3” is not yet finished. wait a day or two to let the dust settle @ziarno. This requires coordination of Meteor and react-runtime, which are on separate release cycles.

You might be interested in this official article in the Guide:

We’re also going to clarify this more in the 1.3 release announcement.