Giter Site home page Giter Site 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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechat-weapp-redux-todos's Issues

LICENSE

请问这个项目开源吗?如果开源的话会用什么 License 呢?谢谢。

一个兼容性bug

在项目中,发现没有使用wx.getSystemInfo这个API去获取使用机型的系统信息。
然后通过windowWidth,windowHeight和safeArea来调整小程序的布局设置。

没有通过wx.getSystemInfo的适配,在部分机型上可能会出现一些样式问题。

您好,方便确认一下该问题吗

(intermediate value) is not a function

点击工具按钮“Dispatcher”, 然后在输入框中输入

{
type: 'ADD_TODO', text: 'fuck'
}

点击“Dispatch”
工具红色bar显示:(intermediate value) is not a function,我用官方的todos例子尝试非修改版的remote-redux-devtools可以正常dispatch
这是少改了什么东西吗?

跑不起来

请问libs目录下是不是少了一些文件,git clone 项目并运行后,会报lib/redux.js is not defined, libs/redux-persist.js is not defined

请教

看不懂代码,请问这个项目都运用了哪些知识啊?ES6、redux,还有哪些呢?

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.