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

React Native support #111

Closed
stephenmathieson opened this issue Dec 16, 2016 · 4 comments
Closed

React Native support #111

stephenmathieson opened this issue Dec 16, 2016 · 4 comments

Comments

@stephenmathieson
Copy link

Any plans to add support? I think all we need is #58 to land.

@yasaichi
Copy link

yasaichi commented Jan 29, 2017

@stephenmathieson
Since I wanted to do that, I forked the master and add some changes on @yasaichi/redux-api-middleware.
It allows you to use any fetch implementations as follows:

import { createStore, applyMiddleware, combineReducers } from 'redux';
import { apiMiddlewareCreator } from '@yasaichi/redux-api-middleware';
import reducers from './reducers';

const apiMiddleware = apiMiddlewareCreator(fetch);
const createStoreWithMiddleware = applyMiddleware(apiMiddleware)(createStore);
const reducer = combineReducers(reducers);

export default function configureStore(initialState) {
  return createStoreWithMiddleware(reducer, initialState);
}

How would you like to try it? (Sorry that currently it works only on v0.41.0-rc.0 or later 🙇)

@stephenmathieson
Copy link
Author

@yasaichi I ended up finishing my RN project and don't have an immediate need for this. I will check it out in the next few days tho!!

@jordanmkoncz
Copy link

Thanks @yasaichi, I'm now using your fork and everything seems to be working correctly.

@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
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

4 participants