Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

feast-redux

RubaXa7MIT0.3.0

Experimental Feast bindings for Redux

feast, redux

readme

Feast Redux

Experimental Feast bindings for Redux.

Examples

Usage

// ./blocks/app.js
import feast from 'feast';
import {connect} from 'feast-redux';
import template from './app.html';
import {singin} from '../path/to/actions';

const UIApp = feast.Block.extend({
    name: 'app',
    template,
    eventsToActions: {
        'remited-event-name': {
            action: singin,
            arguments: (app, evt) => [app.refs.login.value, app.refs.password.value]
        }
    }
});

export default connect(
    (state) => state, // mapStateToAttrs
    (dispatch) => ({dispatch}) // mapDispatchToAttrs
)(UIApp);

// index.js
import App from './blocks/app.js';
import configureStore from './store/configureStore';

const store = configureStore();

new App({}, {store}).renderTo(document.getElementById('root'));