mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 17:18:09 +00:00
* Add Redux bindings for new event system * construct -> create * react-navigation-redux-helpers
28 lines
675 B
JavaScript
28 lines
675 B
JavaScript
import React from 'react';
|
|
import { AppRegistry } from 'react-native';
|
|
import { Provider } from 'react-redux';
|
|
import { createStore, applyMiddleware } from 'redux';
|
|
|
|
import AppReducer from './src/reducers';
|
|
import AppWithNavigationState from './src/navigators/AppNavigator';
|
|
import { middleware } from './src/utils/redux';
|
|
|
|
const store = createStore(
|
|
AppReducer,
|
|
applyMiddleware(middleware),
|
|
);
|
|
|
|
class ReduxExampleApp extends React.Component {
|
|
render() {
|
|
return (
|
|
<Provider store={store}>
|
|
<AppWithNavigationState />
|
|
</Provider>
|
|
);
|
|
}
|
|
}
|
|
|
|
AppRegistry.registerComponent('ReduxExample', () => ReduxExampleApp);
|
|
|
|
export default ReduxExampleApp;
|