Releases: reduxjs/redux
Releases · reduxjs/redux
v0.5.1
v0.5.0
- Store function names are no longer significant, but you have to pass an object with all your Stores to the
root
(orRoot
). Fixes #16
import { root } from 'redux';
import * as stores from './stores/index';
@root(stores)
export default class TodoApp {
import { root } from 'redux';
import * as stores from './stores/index';
export default class TodoApp {
render() {
return (
<Root stores={stores}>
v0.4.0
v0.3.1
v0.3.0
Complete rewrite.
- No more strings, now using module bindings for injecting stores and actions
- Only use decorator for top-level component, keep dumb components pure and testable (#5)
- Remove transaction logic (will be re-implemented on top of #6)
// The smart component may inject actions
// and observe stores using <Container />:
import React, { Component } from 'react';
import { Root, Container } from 'redux';
import { increment, decrement } from './actions/CounterActions';
import counterStore from './stores/counterStore';
import Counter from './Counter';
export default class CounterContainer {
render() {
// stores can be a single store or an array.
// actions can only be a string -> function map.
// props passed to children will combine these actions and state.
return (
<Container stores={counterStore}
actions={{ increment, decrement }}>
{props => <Counter {...props} />}
</Container>
);
}
}
Minor caveat: Store function names are now significant.