Skip to content

Commit

Permalink
update UsageWithReact.md to React 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
omnidan committed Oct 15, 2015
1 parent 94ac8f7 commit c0f366d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/basics/UsageWithReact.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ These are all normal React components, so we won’t stop to examine them in det
#### `components/AddTodo.js`

```js
import React, { findDOMNode, Component, PropTypes } from 'react';
import React, { Component, PropTypes } from 'react';

export default class AddTodo extends Component {
render() {
Expand All @@ -103,7 +103,7 @@ export default class AddTodo extends Component {
}

handleClick(e) {
const node = findDOMNode(this.refs.input);
const node = this.refs.input;
const text = node.value.trim();
this.props.onAddClick(text);
node.value = '';
Expand Down Expand Up @@ -274,6 +274,7 @@ First, we need to import `Provider` from [`react-redux`](http://github.com/gaear

```js
import React from 'react';
import { render } from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import App from './containers/App';
Expand All @@ -282,11 +283,11 @@ import todoApp from './reducers';
let store = createStore(todoApp);

let rootElement = document.getElementById('root');
React.render(
render(
// The child must be wrapped in a function
// to work around an issue in React 0.13.
<Provider store={store}>
{() => <App />}
<App />
</Provider>,
rootElement
);
Expand Down

0 comments on commit c0f366d

Please sign in to comment.