0.0.2 • Published 7 years ago
@zcorky/dva4taro v0.0.2
dva4taro
Connect dva with taro. It is written fully with Typescript.
- 🕒 Familiar dvaAPI & patterns
- 💪 Node and Browser Support
- 🔥 TypeScript
Install
$ npm install @zcorky/dva4taroUsage
import Taro, { Component } from '@tarojs/taro'
import { Provider } from '@tarojs/redux'
import { createStore } from '@zcorky/dva4taro';
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
Relatived
License
MIT © Moeover