1.0.0 • Published 8 years ago

riotjs-redux v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

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>