https://github.com/co2-git/react-ez-store
Easily share data across different React components. Like Redux or mobx, but dead simpler!
https://github.com/co2-git/react-ez-store
Last synced: about 1 year ago
JSON representation
Easily share data across different React components. Like Redux or mobx, but dead simpler!
- Host: GitHub
- URL: https://github.com/co2-git/react-ez-store
- Owner: co2-git
- Created: 2018-11-21T15:40:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-10T22:41:36.000Z (over 7 years ago)
- Last Synced: 2025-02-01T16:23:16.779Z (over 1 year ago)
- Language: TypeScript
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
react-store
===
React store
# Install
```bash
# with yarn
yarn add @francoisv/react-store
# with npm
npm i -S @francoisv/react-store
```
# Click counter example
```jsx
import React from 'react'
import store, { withStore } from '@francoisv/react-store'
const counter = store.number(0)
const ClickCounter = withStore(counter)(() => (
Clicked { store.get(counter) }
store.increment(counter) }>Click
))
```
More examples in the [wiki](https://github.com/co2-git/react-ez-store/wiki)