Git Product home page Git Product logo

wechat-weapp-redux-todos's Introduction

微信小程序集成Redux实现的Todo list

在微信小程序中使用Redux实现Todo list,同时集成了redux-devtools

remote-redux-devtools

使用了我自己写的小程序的Redux绑定库:wechat-weapp-redux

使用

导入到微信的开发工具目录指向src运行就可以了。

开启redux-devtools

需要打开小程序开发工具的配置中项目->基础信息->开发环境不校验请求域名以及 TLS 版本

weapp-config

  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并启动

    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.

wechat-weapp-redux-todos's People

Contributors

charleyw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.