An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# iReactivity-counter-example

### To start
- `npm i`
- `npm start`

### Example
```javascript
// index.js

import 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.js

import 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)