Skip to content

Commit

Permalink
Update todos-with-undo example to React 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Oct 15, 2015
1 parent c5d615e commit e2913e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/todos-with-undo/components/AddTodo.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { findDOMNode, Component, PropTypes } from 'react';
import React, { Component, PropTypes } from 'react';

export default class AddTodo extends Component {
handleClick() {
const node = findDOMNode(this.refs.input);
const node = this.refs.input;
const text = node.value.trim();
this.props.onAddClick(text);
node.value = '';
Expand Down
5 changes: 3 additions & 2 deletions examples/todos-with-undo/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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 @@ -7,9 +8,9 @@ import todoApp from './reducers';
const store = createStore(todoApp);

const rootElement = document.getElementById('root');
React.render(
render(
<Provider store={store}>
{() => <App />}
<App />
</Provider>,
rootElement
);
5 changes: 3 additions & 2 deletions examples/todos-with-undo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
},
"homepage": "http://rackt.github.io/redux",
"dependencies": {
"react": "^0.13.3",
"react-redux": "^2.1.2",
"react": "^0.14.0",
"react-dom": "^0.14.0",
"react-redux": "^4.0.0",
"redux": "^3.0.0",
"redux-thunk": "^0.1.0",
"redux-undo": "^0.5.0"
Expand Down

0 comments on commit e2913e1

Please sign in to comment.