feast-redux

0.3.0 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.02latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.02
0.2.00
0.1.11
0.1.00

Package Sidebar

Install

npm i feast-redux

Weekly Downloads

3

Version

0.3.0

License

MIT

Last publish

Collaborators

  • rubaxa