神刀安全网

Redux Boot – Minimal modular Redux bootstrap with asynchronous side-effects.

Redux Boot

Redux Boot - Minimal modular Redux bootstrap with asynchronous side-effects.

Modular Redux bootstrap with asynchronous side-effects.

What is Redux Boot?

Minimal Framework using Redux to develop modularized universal (backend and frontend) applications, based on functional programming paradigms and friends such as Map and Reduce, Immutability and Reactive programming.

"Simplicity is the ultimate sophistication." — Leonardo da Vinci

What Redux Boot provides?

  • Module API – Clean organization and reuse patterns for your code.
  • Async side-effectsNo-brainer async side-effects withredux-actions andredux-promise.

Getting started

Install

npm install redux-boot

Example

import boot, {BOOT} from 'redux-boot'  const initialState = {   foo: 'bar' }  const testModule = {   reducer(state, action) {     if (action.type === BOOT) {       return {         ...state,         foo: 'baz'       }     }     return state   } }  const modules = [   testModule ]  const app = boot(initialState, modules)  app.then(({action, store}) => {    // Should print 'baz'.   console.log(store.getState().foo)  })

Development setup:

Install

git clone https://github.com/choko-org/redux-boot.git npm install

Build

npm run build

Build and Run the tests

npm test

Examples:

Soon … but for now see thebootstrap tests.

License

GNU General Public License (GPL) version 3.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Redux Boot – Minimal modular Redux bootstrap with asynchronous side-effects.

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址