Redux 源码 中同时包含一些示例。
复制代码时注意
如果你把 Redux 示例代码复制到其它目录,可以删除位于
webpack.config.js文件尾部 “You can safely delete these lines in your project.” 注释后的代码。
运行 Counter 示例:
git clone https://github.com/rackt/redux.git
cd redux/examples/counter
npm install
npm start
open http://localhost:3000/
这个示例包含:
运行 TodoMVC 示例:
git clone https://github.com/rackt/redux.git
cd redux/examples/todomvc
npm install
npm start
open http://localhost:3000/
这个示例包含:
运行 todos-with-undo 示例:
git clone https://github.com/rackt/redux.git
cd redux/examples/todos-with-undo
npm install
npm start
open http://localhost:3000/
这个示例包含:
运行 Async 示例:
git clone https://github.com/rackt/redux.git
cd redux/examples/async
npm install
npm start
open http://localhost:3000/
这个示例包含:
运行 Universal 示例:
git clone https://github.com/rackt/redux.git
cd redux/examples/universal
npm install
npm start
open http://localhost:3000/
这个示例包含:
运行 Real World 示例:
git clone https://github.com/rackt/redux.git
cd redux/examples/real-world
npm install
npm start
open http://localhost:3000/
这个示例包含:
参考 Awesome Redux 获取更多示例。