https://github.com/slavahatnuke/ireactivity-counter-example
The simplest ireactivity binding example
https://github.com/slavahatnuke/ireactivity-counter-example
Last synced: 2 months ago
JSON representation
The simplest ireactivity binding example
- Host: GitHub
- URL: https://github.com/slavahatnuke/ireactivity-counter-example
- Owner: slavahatnuke
- Created: 2017-04-26T00:46:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-01T22:17:51.000Z (about 8 years ago)
- Last Synced: 2025-01-28T23:31:16.879Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iReactivity-counter-example
### To start
- `npm i`
- `npm start`### Example
```javascript
// index.jsimport React from 'react';
import ReactDOM from 'react-dom';
import {Provider, connect} from 'ireactivity';import AppView from './App';
const store = {
counter: 0
};const App = connect(AppView, {
counter: (store) => store.counter,
onUp: (store) => () => store.counter = store.counter + 1
});ReactDOM.render(
,
document.getElementById('root')
);
``````javascript
// App.jsimport React from 'react';
export default ({counter, onUp}) =>
{counter}
UP
```## iReactivity
This is simple react binding
[https://www.npmjs.com/package/ireactivity](https://www.npmjs.com/package/ireactivity)