Skip to content

Repository files navigation

react-waterfall

React store built on top of the new context API

Basics

store.js

importcreateStorefrom'react-waterfall'constconfig={initialState: {count: 0},actionsCreators: {increment: ({ count })=>({count: count+1}),},}exportconst{ Provider, connect, actions }=createStore(config)

App.js

import{connect,Provider,actions}from'./store'letCount=({ count })=>countCount=connect(({ count })=>({ count }))(Count)constApp=()=>(<Provider><Count/><buttononClick={actions.increment}>+</button></Provider>)

Devtools

During development redux-devtools are automatically enabled. Install the extension.

Contributors

https://github.com/didierfranc/react-waterfall/graphs/contributors

Links

About

React store built on top of the new context API

Topics

Resources

Stars

1.3k stars

Watchers

21 watching

Forks

Releases

Packages

Used by

Contributors

Languages