diff --git a/src/components/App.js b/src/components/App.js index b996ee6..ab10f31 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -1,36 +1,40 @@ -import React from 'react'; +import React, { Component } from 'react'; import TodoList from './TodoList'; /** * App component. */ -const App = () => { - const items = [ - { - id: 1, - text: 'Take out the trash', - completed: false - }, - { - id: 2, - text: 'Buy bread', - completed: false - }, - { - id: 3, - text: 'Teach penguins to fly', - completed: true - } - ]; +class App extends Component { + state = { + items: [ + { + id: 1, + text: 'Take out the trash', + completed: false + }, + { + id: 2, + text: 'Buy bread', + completed: false + }, + { + id: 3, + text: 'Teach penguins to fly', + completed: true + } + ] + }; - return ( -
-
- + render() { + return ( +
+
+ +
-
- ); + ); + } } export default App;