Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/didierfranc/react-waterfall
React store built on top of the new context API
https://github.com/didierfranc/react-waterfall
context flux javascript reactjs redux
Last synced: about 4 hours ago
JSON representation
React store built on top of the new context API
- Host: GitHub
- URL: https://github.com/didierfranc/react-waterfall
- Owner: didierfranc
- License: mit
- Created: 2018-02-20T23:01:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-24T09:58:01.000Z (about 1 year ago)
- Last Synced: 2024-12-12T01:36:32.650Z (about 10 hours ago)
- Topics: context, flux, javascript, reactjs, redux
- Language: JavaScript
- Homepage:
- Size: 2.36 MB
- Stars: 1,329
- Watchers: 24
- Forks: 77
- Open Issues: 57
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - react-waterfall
- awesome-react-state-management - react-waterfall - React store built on top of the new context API. (List)
- awesome-react-context - **react-waterfall** - React store built on top of the new context API. (Libraries)
README
# react-waterfall
React store built on top of [the new context API](https://reactjs.org/docs/context.html)
## Basics
**store.js**
```js
import createStore from 'react-waterfall'const config = {
initialState: { count: 0 },
actionsCreators: {
increment: ({ count }) => ({ count: count + 1 }),
},
}export const { Provider, connect, actions } = createStore(config)
```**App.js**
```js
import { connect, Provider, actions } from './store'let Count = ({ count }) => count
Count = connect(({ count }) => ({ count }))(Count)const App = () => (
+
)
```## Devtools
During development `redux-devtools` are automatically enabled. Install the [extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd).
## Contributors
https://github.com/didierfranc/react-waterfall/graphs/contributors
## Links
* https://twitter.com/DidierFranc/status/965733433711489024
* https://medium.com/@DidierFranc/replacing-redux-with-the-new-react-context-api-8f5d01a00e8c