⬆️ Major bumps! Move to RN 0.59
- ⬆️ Bump all dependencies - ⬆️ react-native 0.59.x using the the `react-native eject` method - ⬆️ react 16.8.x - ⬆️ react-navigation 3.x - ⬆️ tipsi-stripe 7.x - 📝 Add section on linking native dependencies to README - 🔥 Remove bitrise android build support - 🐛 Add a 10 second timeout to all API requests and stop persisting HTTP request state fixing requests hangs
This commit is contained in:
1 parent
3c7564d7bb
commit
8bbbf06fac
16 files changed
+1700
-1104
No files matched your search
+7
-18
@@ -1,10 +1,6 @@
|
||||
import React, {Component} from 'react';
|
||||
import {Provider} from 'react-redux';
|
||||
import {applyMiddleware, createStore} from 'redux';
|
||||
import logger from 'redux-logger';
|
||||
import thunk from 'redux-thunk';
|
||||
import {autoRehydrate, persistStore} from 'redux-persist'
|
||||
import {AsyncStorage} from 'react-native'
|
||||
import {PersistGate} from 'redux-persist/es/integration/react'
|
||||
import Config from 'react-native-config';
|
||||
import {ApolloClient} from 'apollo-client';
|
||||
import {HttpLink} from 'apollo-link-http';
|
||||
@@ -12,15 +8,9 @@ import {InMemoryCache} from 'apollo-cache-inmemory';
|
||||
import {ApolloProvider} from "react-apollo";
|
||||
|
||||
import Dusken from "./Dusken";
|
||||
import duskenApp from "./reducers";
|
||||
import {store, persistor} from './reduxStore';
|
||||
|
||||
|
||||
let store = createStore(
|
||||
duskenApp,
|
||||
applyMiddleware(...[logger, thunk]),
|
||||
autoRehydrate()
|
||||
);
|
||||
|
||||
const apolloClient = new ApolloClient({
|
||||
link: new HttpLink({uri: `${Config.DUSKEN_API_URL}/api/graphql/`}),
|
||||
cache: new InMemoryCache()
|
||||
@@ -30,13 +20,12 @@ export default class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<Dusken />
|
||||
</ApolloProvider>
|
||||
<PersistGate loading={null} persistor={persistor}>
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<Dusken />
|
||||
</ApolloProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// begin periodically persisting the store
|
||||
persistStore(store, {storage: AsyncStorage});
|
||||
Reference in new issue
Block a user