mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-26 09:14:22 +08:00
Upgrade the ReduxExample app (use CRNA) (#2171)
* [ReduxExample] Delete android and ios dirs * [ReduxExample] Upgrade using create-react-native-app * [ReduxExample] Add postinstall script to clean up files Yarn copies in Yarn copies them when installing locally, causing lots of @proviesModule collisions. * [ReduxExample] Upgrade expo and other dependencies * [ReduxExample] Don't delete .git just in case
This commit is contained in:
committed by
Spencer Carli
parent
af53b0e5b8
commit
312b68790a
27
examples/ReduxExample/App.js
Normal file
27
examples/ReduxExample/App.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { AppRegistry } from 'react-native';
|
||||
import { Provider } from 'react-redux';
|
||||
import { createStore } from 'redux';
|
||||
|
||||
import AppReducer from './src/reducers';
|
||||
import AppWithNavigationState from './src/navigators/AppNavigator';
|
||||
|
||||
class ReduxExampleApp extends React.Component {
|
||||
store = createStore(AppReducer);
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Provider store={this.store}>
|
||||
<AppWithNavigationState />
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent('ReduxExample', () => ReduxExampleApp);
|
||||
|
||||
export default ReduxExampleApp;
|
||||
Reference in New Issue
Block a user