File tree Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
- import React , { PropTypes } from 'react' ;
1
+ import React , { Component , PropTypes } from 'react' ;
2
2
3
- export default class Counter {
3
+ export default class Counter extends Component {
4
4
static propTypes = {
5
5
increment : PropTypes . func . isRequired ,
6
6
incrementIfOdd : PropTypes . func . isRequired ,
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { Component } from 'react' ;
2
2
import CounterApp from './CounterApp' ;
3
3
import { createRedux } from 'redux' ;
4
4
import { Provider } from 'redux/react' ;
5
5
import * as stores from '../stores' ;
6
6
7
7
const redux = createRedux ( stores ) ;
8
8
9
- export default class App {
9
+ export default class App extends Component {
10
10
render ( ) {
11
11
return (
12
12
< Provider redux = { redux } >
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { Component } from 'react' ;
2
2
import { bindActionCreators } from 'redux' ;
3
3
import { connect } from 'redux/react' ;
4
4
import Counter from '../components/Counter' ;
@@ -7,7 +7,7 @@ import * as CounterActions from '../actions/CounterActions';
7
7
@connect ( state => ( {
8
8
counter : state . counter
9
9
} ) )
10
- export default class CounterApp {
10
+ export default class CounterApp extends Component {
11
11
render ( ) {
12
12
const { counter, dispatch } = this . props ;
13
13
return (
Original file line number Diff line number Diff line change 1
- import React , { PropTypes } from 'react' ;
1
+ import React , { PropTypes , Component } from 'react' ;
2
2
import classnames from 'classnames' ;
3
3
import { SHOW_ALL , SHOW_MARKED , SHOW_UNMARKED } from '../constants/TodoFilters' ;
4
4
@@ -8,7 +8,7 @@ const FILTER_TITLES = {
8
8
[ SHOW_MARKED ] : 'Completed'
9
9
} ;
10
10
11
- export default class Footer {
11
+ export default class Footer extends Component {
12
12
static propTypes = {
13
13
markedCount : PropTypes . number . isRequired ,
14
14
unmarkedCount : PropTypes . number . isRequired ,
Original file line number Diff line number Diff line change 1
- import React , { PropTypes } from 'react' ;
1
+ import React , { PropTypes , Component } from 'react' ;
2
2
import TodoTextInput from './TodoTextInput' ;
3
3
4
- export default class Header {
4
+ export default class Header extends Component {
5
5
static propTypes = {
6
6
addTodo : PropTypes . func . isRequired
7
7
} ;
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { Component } from 'react' ;
2
2
import TodoApp from './TodoApp' ;
3
3
import { createRedux } from 'redux' ;
4
4
import { Provider } from 'redux/react' ;
5
5
import * as stores from '../stores' ;
6
6
7
7
const redux = createRedux ( stores ) ;
8
8
9
- export default class App {
9
+ export default class App extends Component {
10
10
render ( ) {
11
11
return (
12
12
< Provider redux = { redux } >
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { Component } from 'react' ;
2
2
import { bindActionCreators } from 'redux' ;
3
3
import { Connector } from 'redux/react' ;
4
4
import Header from '../components/Header' ;
5
5
import MainSection from '../components/MainSection' ;
6
6
import * as TodoActions from '../actions/TodoActions' ;
7
7
8
- export default class TodoApp {
8
+ export default class TodoApp extends Component {
9
9
render ( ) {
10
10
return (
11
11
< Connector select = { state => ( { todos : state . todos } ) } >
You can’t perform that action at this time.
0 commit comments