1.1.2 • Published 8 years ago

deku-redux v1.1.2

Weekly downloads
15
License
MIT
Repository
github
Last release
8 years ago

Build Status

deku-redux

Bindings for redux in deku.

npm install deku-redux

Redux

Read the docs about Redux: Redux docs. If you are familiar with react-redux, deku-redux is very similar.

storePlugin(store)

Add your store to your tree with storePlugin. It is required for connect to be able to get access to your state.

import { tree, render } from 'deku';
import element from 'virtual-element';
import { createStore } from 'redux';
import { storePlugin } from 'deku-redux';
import reducers from './reducers';
import App from './components/App';

const store = createStore(reducers);

const app = tree()
    .use(storePlugin(store))
    .mount(element(App));

render(app, document.getElementById('app'));

connect(mapStateToProps, mapDispatchToProps, mergeProps)

Use connect higher-order component for connecting to your state, same as connect from react-redux.

See Redux with React for more information on how to use.

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

9 years ago

1.0.0-alpha.1

9 years ago