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

[fluxible-addons-react] batchedUpdatePlugin breaks compatibility with react-native #443

Closed
malaman opened this issue May 20, 2016 · 7 comments

Comments

@malaman
Copy link
Contributor

malaman commented May 20, 2016

Hello,
fluxible-addons-react has inherits as a dependency.
inherits uses node.js util.inerits function to work in non-browser enviroments.
We are trying to integrate fluxibe/fluxible-addons-react with react-native and usage of the node.utils breaks integration with react-native.
I've changed inherits module to custom inherits without node imports and integration seems to work fine.
Could you please change this in the fluxible-addons-react package?

@redonkulus
Copy link
Contributor

@malaman which version of fluxible-addons-react are you using? We actually depend on the "inherits" modules:

@malaman
Copy link
Contributor Author

malaman commented May 20, 2016

fluxible-addons-react: 0.2.8
I can address issue to inherits repository, but i have doubts they will change something for the react-native compatibility of fluxible-addons-react.

@redonkulus
Copy link
Contributor

Oh I see, we can probably find another inherits version on npm that satisifies react-native and doesn't use the native one. You are welcome to open a PR if you want.

@malaman
Copy link
Contributor Author

malaman commented May 20, 2016

Ok. I will look for alternatives and open PR, if I find something.

@koulmomo
Copy link
Contributor

surprised this is an issue

thanks to facebook/react-native#2208, react-native should fallback to the browser field of packages if one is specified.

I would check if explicitly adding a react-native field to the inherits package.json that points to the browser impl fixes it for you and if so PR-ing that change to inherits.

@malaman
Copy link
Contributor Author

malaman commented May 27, 2016

Hi again,
I've made additional debugs of the issue.
The reason of errors is not the inherits module, but batchedUpdatePlugin in the fluxible-addons-react.
If i've commented batchedUpdatePlugin from the module.exports in the fluxible-addons-react/index.js, and receive no errors.
I've prepared basic example of integration:
https://github.com/malaman/fluxible-react-native

@malaman malaman changed the title [fluxible-addons-react] inherits dependency on node util.inherits breaks compatibility with react-native [fluxible-addons-react] batchedUpdatePlugin breaks compatibility with react-native Jun 7, 2016
@malaman
Copy link
Contributor Author

malaman commented Jun 13, 2016

Currently we import connectToStores and provideContext directly from source files as workaround for batchedUpdatePlugin issue.

import connectToStores from 'fluxible-addons-react/connectToStores';
import provideContext from 'fluxible-addons-react/provideContext';

I've updated example repository (https://github.com/malaman/fluxible-react-native) in case if someone will face same issue.

@malaman malaman closed this as completed Jun 13, 2016
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

3 participants