微信小程序集成Redux实现的Todo list
======================
在微信小程序中使用[Redux](https://github.com/reactjs/redux)实现Todo list,同时集成了redux-devtools
![remote-redux-devtools](./remote-redux-devtools.gif)
使用了我自己写的小程序的Redux绑定库:[wechat-weapp-redux](https://github.com/charleyw/wechat-weapp-redux)
### 使用
导入到微信的开发工具目录指向`src`运行就可以了。
### 开启redux-devtools
1. 把本项目根目录下的libs拷贝到`src/libs`中
2. 修改`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;
```
1. 本地安装remotedev-server并启动
```shell
npm install -g remotedev-server
remotedev --hostname=localhost --port=5678
```
2. 浏览器中访问**localhost:5678**
如果不能访问,可以尝试使用**http://remotedev.io/local/**,打开后点击下面的setting,设置使用本地的server。
### Todos
* 集成redux-undo
* 集成redux-persist
## Liscense
© 2016 Wang Chao. This code is distributed under the MIT license.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
todo list.zip (22个子文件)
todo list
remote-redux-devtools.gif 1.28MB
wechat-weapp-redux-todos-master
remote-redux-devtools.gif 1.28MB
LICENSE 1KB
src
reducers
todos.js 686B
index.js 273B
visibilityFilter.js 217B
app.json 218B
LICENSE 1KB
configureStore.js 443B
pages
index
index.js 1KB
index.wxss 404B
index.wxml 711B
app.wxss 133B
app.js 219B
README.md 910B
actions
index.js 365B
utils
Object.js 686B
libs
wechat-weapp-redux.js 9KB
redux.js 29KB
.gitignore 592B
README.md 1KB
libs
remote-redux-devtools.js 305KB
共 22 条
- 1
资源评论
- 卿星2023-11-07资源太好了,解决了我当下遇到的难题,抱紧大佬的大腿~
小风飞子
- 粉丝: 322
- 资源: 1500
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功