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

Add support for React Native, remove and replace isomorphic-fetch #119

Closed
Connorelsea opened this issue Mar 6, 2017 · 4 comments
Closed

Comments

@Connorelsea
Copy link

Connorelsea commented Mar 6, 2017

Hello, I really like this library and use it quite frequently, but currently, it does not work with React Native.

This malfunction is due to redux-api-middleware's dependency on isomorphic-fetch, which has opted to not support React Native users. Despite Github implementing a similar fix on their equivalent library, isomorphic-fetch has chosen not to.

Due to this, some other projects have switched from isomorphic-fetch to fetch-everywhere in order to retain the same functionality while also supporting React Native. fetch-everywhere is an alternative library built using the same dependencies as isomorphic-fetch, but it includes support for React Native.

Would you consider switching fetch libraries in order to support React Native?

I am not faulting the maintainer of isomorphic-fetch, as I am fully aware people have lives outside of open source, but it is seemingly unmaintained. As of right now, fetch-everywhere seems like a better solution. Switching libraries will allow React Native users to use redux-api-middleware while also allowing users on other platforms to remain unaffected.

Examples of RN Fetch Issues Occuring

Here is one of the initial threads about this issue: matthew-andrews/isomorphic-fetch#63

Here is a continued thread about the issues that has yet to be merged. matthew-andrews/isomorphic-fetch#125

Here is a thread showing the maintainer's unwillingness to merge the fix, indicating a need for dependent libraries to switch if they wish to support React Native users: matthew-andrews/isomorphic-fetch#80

Github's Solution

JakeChampion/fetch#253

Libraries Switching from isomorphic-fetch to fetch-everywhere

Here is an example of another library removing isomorphic-fetch: redux-json-api/redux-json-api#91

@mlippens
Copy link

Why not just use global fetch and remove the import statement all together? Then the consumer of the library is responsible for providing the correct implementation instead. Is this also a viable solution for React Native?

@agraboso
Copy link
Owner

agraboso commented May 1, 2017

The next branch (which will lead to version 2) removes isomorphic-fetch in favor of the global fetch.

@agraboso agraboso closed this as completed May 1, 2017
@maryam-mokhtari
Copy link

@agraboso We are expecting version 2.
When would you release it?

@nason
Copy link
Collaborator

nason commented Aug 1, 2017

@mayyamak I am working on it, but don't have a lot of time to give to this project. There is a beta published to npm, based on the 'next' branch.

There are a few things left to do. You're more than welcome to contribute.

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

5 participants