App.js 626 B

1234567891011121314151617181920212223242526
  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. console.log(store)
  9. class HuiLiaoApp extends React.Component {
  10. render() {
  11. return (
  12. <Provider store={store}>
  13. <AppNavigator />
  14. </Provider>
  15. );
  16. }
  17. }
  18. AppRegistry.registerComponent('huiliaoJmessage', () => HuiLiaoApp);
  19. export default HuiLiaoApp;