Skip to content

Commit

Permalink
Update todomvc 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 18337d5 commit 9421310
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 20 deletions.
6 changes: 3 additions & 3 deletions examples/todomvc/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import 'babel-core/polyfill';

import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
import 'todomvc-app-css/index.css';

const store = configureStore();

React.render(
render(
<Provider store={store}>
{() => <App />}
<App />
</Provider>,
document.getElementById('root')
);
6 changes: 4 additions & 2 deletions examples/todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"homepage": "http://rackt.github.io/redux",
"dependencies": {
"classnames": "^2.1.2",
"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"
},
"devDependencies": {
Expand All @@ -32,6 +33,7 @@
"mocha": "^2.2.5",
"node-libs-browser": "^0.5.2",
"raw-loader": "^0.5.1",
"react-addons-test-utils": "^0.14.0",
"react-transform-hmr": "^1.0.0",
"style-loader": "^0.12.3",
"todomvc-app-css": "^2.0.1",
Expand Down
5 changes: 2 additions & 3 deletions examples/todomvc/test/components/Footer.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import expect from 'expect';
import React from 'react/addons';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Footer from '../../components/Footer';
import { SHOW_ALL, SHOW_ACTIVE } from '../../constants/TodoFilters';

const { TestUtils } = React.addons;

function setup(propOverrides) {
const props = Object.assign({
completedCount: 0,
Expand Down
5 changes: 2 additions & 3 deletions examples/todomvc/test/components/Header.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import expect from 'expect';
import React from 'react/addons';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Header from '../../components/Header';
import TodoTextInput from '../../components/TodoTextInput';

const { TestUtils } = React.addons;

function setup() {
const props = {
addTodo: expect.createSpy()
Expand Down
5 changes: 2 additions & 3 deletions examples/todomvc/test/components/MainSection.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import expect from 'expect';
import React from 'react/addons';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import MainSection from '../../components/MainSection';
import TodoItem from '../../components/TodoItem';
import Footer from '../../components/Footer';
import { SHOW_ALL, SHOW_COMPLETED } from '../../constants/TodoFilters';

const { TestUtils } = React.addons;

function setup(propOverrides) {
const props = Object.assign({
todos: [{
Expand Down
5 changes: 2 additions & 3 deletions examples/todomvc/test/components/TodoItem.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import expect from 'expect';
import React from 'react/addons';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import TodoItem from '../../components/TodoItem';
import TodoTextInput from '../../components/TodoTextInput';

const { TestUtils } = React.addons;

function setup( editing = false ) {
const props = {
todo: {
Expand Down
5 changes: 2 additions & 3 deletions examples/todomvc/test/components/TodoTextInput.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import expect from 'expect';
import React from 'react/addons';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import TodoTextInput from '../../components/TodoTextInput';

const { TestUtils } = React.addons;

function setup(propOverrides) {
const props = Object.assign({
onSave: expect.createSpy(),
Expand Down

0 comments on commit 9421310

Please sign in to comment.