@@ -136,10 +136,10 @@ export default class Counter {
136136
137137``` js
138138// The smart component may inject actions
139- // and observe stores using <Container />:
139+ // and observe stores using <Injector />:
140140
141141import React , { Component } from ' react' ;
142- import { Root , Container } from ' redux' ;
142+ import { Injector } from ' redux' ;
143143import * as CounterActions from ' ./actions/CounterActions' ;
144144import counterStore from ' ./stores/counterStore' ;
145145import Counter from ' ./Counter' ;
@@ -149,11 +149,11 @@ export default class CounterContainer {
149149 // stores and actions must both be string -> function maps.
150150 // props passed to children will combine these actions and state.
151151 return (
152- < Container stores= {{ counter: stores .counterStore }}
152+ < Injector stores= {{ counter: stores .counterStore }}
153153 actions= {CounterActions}>
154154 {/* Yes this is a function as a child. Bear with me. */ }
155155 {({ state, actions }) => < Counter {... state} {... actions} / > }
156- < / Container >
156+ < / Injector >
157157 );
158158 }
159159}
@@ -167,10 +167,10 @@ They work exactly the same as the container components, but are lowercase:
167167``` js
168168import React , { PropTypes } from ' react' ;
169169import * as CounterActions from ' ./actions/CounterActions' ;
170- import { container } from ' redux' ;
170+ import { inject } from ' redux' ;
171171import counterStore from ' ./stores/counterStore' ;
172172
173- @container ({
173+ @inject ({
174174 actions: CounterActions,
175175 stores: { counter: counterStore }
176176})
@@ -198,13 +198,15 @@ export default class Counter {
198198
199199#### The root component
200200
201+ Decorate your top-level component with ` @dispatch(stores) ` (or ` <Dispatcher stores={stores}> ` inside) to bind it to a Redux dispatcher instance.
202+
201203``` js
202204import React from ' react' ;
203- import { root } from ' redux' ;
205+ import { dispatch } from ' redux' ;
204206import * as stores from ' ./stores/index' ;
205207
206208// Let it know about all the stores
207- @root (stores)
209+ @dispatch (stores)
208210export default class App {
209211 /* ... */
210212}
0 commit comments