@zcorky/dva-for-taro
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

dva-for-taro

NPM version NPM quality Coverage Status Dependencies Build Status Known Vulnerabilities NPM download license issues Open in Gitpod

Connect dva with taro. It is written fully with Typescript.

  • 🕒 Familiar dva 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

Examples

  • [WIP]

Relatived

License

MIT © Moeover

Package Sidebar

Install

npm i @zcorky/dva-for-taro

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

328 kB

Total Files

15

Last publish

Collaborators

  • uniquecolesmith