@@ -88,7 +88,7 @@ These are all normal React components, so we won’t stop to examine them in det
88
88
#### ` components/AddTodo.js `
89
89
90
90
``` js
91
- import React , { findDOMNode , Component , PropTypes } from ' react' ;
91
+ import React , { Component , PropTypes } from ' react' ;
92
92
93
93
export default class AddTodo extends Component {
94
94
render () {
@@ -103,7 +103,7 @@ export default class AddTodo extends Component {
103
103
}
104
104
105
105
handleClick (e ) {
106
- const node = findDOMNode ( this .refs .input ) ;
106
+ const node = this .refs .input ;
107
107
const text = node .value .trim ();
108
108
this .props .onAddClick (text);
109
109
node .value = ' ' ;
@@ -274,6 +274,7 @@ First, we need to import `Provider` from [`react-redux`](http://github.com/gaear
274
274
275
275
``` js
276
276
import React from ' react' ;
277
+ import { render } from ' react-dom' ;
277
278
import { createStore } from ' redux' ;
278
279
import { Provider } from ' react-redux' ;
279
280
import App from ' ./containers/App' ;
@@ -282,11 +283,11 @@ import todoApp from './reducers';
282
283
let store = createStore (todoApp);
283
284
284
285
let rootElement = document .getElementById (' root' );
285
- React . render (
286
+ render (
286
287
// The child must be wrapped in a function
287
288
// to work around an issue in React 0.13.
288
289
< Provider store= {store}>
289
- {() => < App / > }
290
+ < App / >
290
291
< / Provider> ,
291
292
rootElement
292
293
);
0 commit comments