Skip to content

RubaXa/feast-redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'));

About

Experimental Feast bindings for Redux.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published