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

Is this repo still maintained? Can I send a PR to fix it for React Native? 😊 #19

Open
msafi opened this issue Jun 30, 2017 · 0 comments

Comments

@msafi
Copy link

msafi commented Jun 30, 2017

Hi,

We use this library at Walmart. And now we're trying to use it within our React Native codebase, but unfortunately, it's not working there due to isomorphic-fetch, which is not compatible with React Native.

One way to solve the problem is to modify the package.json of redux-effects-fetch and map isomorphic-fetch to a stub file that basically does nothing (since React Native doesn't need a fetch polyfill).

So, the package.json would be modified to include the following

"react-native": {
  "isomorphic-fetch": "./rn-isomorphic-fetch.js"
}

And the content of rn-isomorphic-fetch.js would simply be:

export default {}

...and by doing that, we fix redux-effects-fetch for React Native apps.

This change would only affect React Native apps because only React Native Packager cares about the react-native key in package.json. webpack and other bundlers ignore this key.

If I send a PR with these changes, would you be able to merge it and publish a new version?

Thanks a lot!

MK

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

1 participant