App.js 599 B

1234567891011121314151617181920212223
  1. import React from 'react';
  2. import { AppRegistry } from 'react-native';
  3. import { Provider } from 'react-redux';
  4. import { createStore, applyMiddleware } from 'redux';
  5. import AppReducer from './src/reducers';
  6. import { AppNavigator, middleware } from './src/navigators/AppNavigator';
  7. const store = createStore(AppReducer, applyMiddleware(middleware));
  8. class HuiLiaoApp extends React.Component {
  9. render() {
  10. return (
  11. <Provider store={store}>
  12. <AppNavigator />
  13. </Provider>
  14. );
  15. }
  16. }
  17. AppRegistry.registerComponent('HuiLiaoApp', () => HuiLiaoApp);
  18. export default HuiLiaoApp;