git通过本文主要向大家介绍了react redux demo,redux demo,redux,metro 2033 redux,gta5redux等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
</div>
在微信小程序中使用Redux实现Todo list,同时集成了redux-devtools

使用了我自己写的小程序的Redux绑定库:wechat-weapp-redux
使用
导入到微信的开发工具目录指向src运行就可以了。
开启redux-devtools
把本项目根目录下的libs拷贝到src/libs中
修改src/configureStore, 改成这样:
const {createStore, compose} = require('./libs/redux.js');
const devTools = require('./libs/remote-redux-devtools.js').default;
const reducer = require('./reducers/index.js')
// function configureStore() {
// return createStore(reducer);
// }
function configureStore() {
return createStore(reducer, compose(devTools({
hostname: 'localhost',
port: 5678,
secure: false
})));
}module.exports = configureStore;
本地安装remotedev-server并启动
npm install -g remotedev-server
remotedev --hostname=localhost --port=5678
浏览器中访问localhost:5678 如果不能访问,可以尝试使用http://remotedev.io/local/,打开后点击下面的setting,设置使用本地的server。
项目地址:https://github.com/charleyw/wechat-weapp-redux-todos
下载地址:https://github.com/charleyw/wechat-weapp-redux-todos/archive/master.zip
</div> GIT </div>
