1 Star 0 Fork 3

八爪鱼工作室/community_e_commerce

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
App.js 1.34 KB
Copy Edit Raw Blame History
greyu authored 2018-04-29 09:28 . 仓库转移
import React from 'react';
import { AppLoading, Font } from 'expo';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import { Provider } from 'react-redux';
import {
createStore,
applyMiddleware,
compose
} from 'redux';
import { Root } from 'native-base';
import Routes from './src/Routes';
import AppStorage from './src/AppStorage';
import thunkMiddleware from 'redux-thunk';
import { createLogger } from 'redux-logger';
import reducers from './src/reducers';
const storage = AppStorage._getStorage()
global.storage = storage
const loggerMiddleware = createLogger()
const store = createStore(
reducers,
compose(
applyMiddleware(
thunkMiddleware
// loggerMiddleware
)
)
)
console.log(store.getState())
export default class App extends React.Component {
constructor(props) {
super(props)
this.state = {
isReady: false
}
}
async componentWillMount() {
await Font.loadAsync({
'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
});
this.setState({
isReady: true
})
}
render() {
if (!this.state.isReady) {
return <AppLoading />
} else {
return (
<Provider store={store}>
<Root>
<Routes />
</Root>
</Provider>
)
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/elfbobo/community_e_commerce.git
git@gitee.com:elfbobo/community_e_commerce.git
elfbobo
community_e_commerce
community_e_commerce
master

Search

0d507c66 1850385 C8b1a773 1850385