This boilerplate is used to create a simple WeChat cloud based mini program using TaroJs with Redux and Saga.
This boilerplate requires newer node environment (>=8.0.0).
$ cd taro-cloud-redux-saga-boilerplate
$ npm install
- TaroJS - ReactJS syntax specification tool to build different solutions like WeChat applet, Baidu applet, etc.
- Redux - State container for javascript apps.
- Redux Saga - Makes side effects (i.e. data fetching) easier to manage and execute.
- Immer - Assists with the immutable state modification.
- WX Server SDK - SDK that helps with the Cloud Base calls.
- Get appId and change appId in
project.config.json
. - Open project in WeChat IDE, go to
Details > Local Settings
and disable "Transpile ES6 to ES5". - Inside WeChat IDE, select the folders
cloudfunctions > wxContext
andcloudfunctions > dbTodos
, then right click to select "Create & Deploy: Install dependencies in the Cloud". - Create a
.env
file just like the example in.env-example
and put the required data. - To get the Cloud ID go inside WeChat IDE, click on
Cloud Base
and then follow the necessary steps.
Import this project in the Wechat IDE and run the following command in your console/bash to start the WeChat mini program in development.
$ npm run dev:weapp
MIT