Before you use the React Redux bindings, learn how to create a complete simple application with just React and Redux.
JS Bin
const counter = (state = 0, action) => { switch (action.type) { case 'INCREMENT': return state + 1; case 'DECREMENT': return state - 1; default: return state; }} const Counter = ({ value, onIncrement, onDecrement}) => ();const { createStore } = Redux;const store = createStore(counter);const render = () => { ReactDOM.render({value}
store.dispatch({ type: 'INCREMENT' }) } onDecrement={() => store.dispatch({ type: 'DECREMENT' }) } />, document.getElementById('root') );};store.subscribe(render);render();
From React 0.14, you can declear a compoment by using a function.