| 5 | Component.call(this); |
| 6 | let cache = {}; |
| 7 | let action = type => cache[type] || (cache[type] = data => { |
| 8 | this.setState(reducer(this.state, { type, data, props: this.props })); |
| 9 | }); |
| 10 | this.render = (props, state) => render(state, action); |
| 11 | this.componentWillReceiveProps = action('@@PROPS'); |
| 12 | this.componentWillMount = action('@@INIT'); |