diff --git a/index.html b/index.html index 1ca371d..d836afa 100644 --- a/index.html +++ b/index.html @@ -5,10 +5,7 @@ MontpellierJS - ToDo List! -
- - \ No newline at end of file diff --git a/src/components/Todo.js b/src/components/Todo.js new file mode 100644 index 0000000..9ba0312 --- /dev/null +++ b/src/components/Todo.js @@ -0,0 +1,12 @@ +import React from 'react' + +export default function Todo(props){ + return ( +
  • + {props.text} +
  • + ) +} \ No newline at end of file diff --git a/src/components/TodoApp.js b/src/components/TodoApp.js index cf942e2..6f626bb 100644 --- a/src/components/TodoApp.js +++ b/src/components/TodoApp.js @@ -1,9 +1,11 @@ import React from 'react' +import TodoList from './TodoList' + export default function TodoApp(props) { return (
    - Todo : Build The App +
    ) } diff --git a/src/components/TodoList.js b/src/components/TodoList.js new file mode 100644 index 0000000..fde395c --- /dev/null +++ b/src/components/TodoList.js @@ -0,0 +1,15 @@ +import React from 'react' + +import Todo from './Todo' + +export default function TodoList(props) { + return ( +
    + +
    + ) +} diff --git a/src/index.js b/src/index.js index 065df99..5914ad2 100644 --- a/src/index.js +++ b/src/index.js @@ -2,4 +2,9 @@ import React from 'react' import { render } from 'react-dom' import TodoApp from './components/TodoApp' -render((),document.getElementById('app')) \ No newline at end of file +var data = [ + {id: 1, text: "Do The App", completed: 0}, + {id: 2, text: "Add data", completed: 1}, +] + +render((), document.getElementById('app')) \ No newline at end of file