riotjs-redux
v1.0.0
Published
connect for riot to redux
Downloads
3
Readme
riotjs-redux
connecter for riot to redux
##Usage
<foo>
<div>
<span>{ opts.count }</span>
<button onclick="{ opts.increase }"></button>
<div>
import { connect } from 'riotjs-redux';
const mapStateToOpts = state => ({
count: state.count
})
const mapActionToOpts = dispatch => ({
increase: dispatch({type: 'increase', payload: 1})
})
connect(mapStateToOpts, mapActionToOpts);
</foo>