Skip to content

brickmaker/Simple-Redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Simple-Redux

A 50-line simple implementation of Redux when learning Redux.

features

  • basic state management:
    • get state
    • dispatch action
    • specify reducer
    • subscribe listener
  • combine reducers
  • using middlewares

API

subset of Redux's API

  • createStore(reducer, enhancer)
    • store.getState()
    • store.dispatch(action)
    • store.subscribe(listener)
  • combineReducers(reducers)
  • applyMiddleware(...middlewares)

example

Based on redux's counter-vanilla example, add combineReducers() and applyMiddleware. see: index.html

About

Redux in 50 lines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published