dva-for-taro
Connect dva with taro. It is written fully with Typescript.
-
🕒 Familiardva
API & patterns -
💪 Node and Browser Support -
🔥 TypeScript
Install
$ npm install @zcorky/dva-for-taro
Usage
import Taro, { Component } from '@tarojs/taro'
import { Provider } from '@tarojs/redux'
import { createStore } from '@zcorky/dva-for-taro';
const store = createStore({
models: [
require('./models/count').default,
],
})
class App extends Component {
config = {
pages: [
'pages/Index/index',
],
window: {
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black',
},
}
render () {
return (
<Provider store={store}>
<Index />
</Provider>
)
}
}
API
- See the detailed API Reference.
Examples
- [WIP]
Relatived
License
MIT © Moeover