-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
34 lines (25 loc) · 792 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import { Provider} from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import reducer from './src/reducers';
import Main from './src'
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader']);
//// applyMiddleware() 告诉 createStore() 如何处理中间件
let store = createStore(reducer, applyMiddleware(thunkMiddleware));
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<Provider store={store}>
<Main/>
</Provider>
)
}
}