This is a simple todo list application built with React.
react-todo-list
├── public
│ ├── index.html
│ └── favicon.ico
├── src
│ ├── App.js
│ ├── index.js
│ ├── components
│ │ ├── TodoList.js
│ │ ├── TodoItem.js
│ │ └── AddTodo.js
│ └── styles
│ ├── App.css
│ ├── TodoList.css
│ ├── TodoItem.css
│ └── AddTodo.css
├── package.json
└── README.md
-
public/index.html
: This file is the HTML template for the application. It includes the root element for the React app and links to the favicon. -
public/favicon.ico
: This file is the icon for the application. -
src/App.js
: This file exports a classApp
which is the root component of the React app. It renders theTodoList
component and theAddTodo
component. -
src/index.js
: This file is the entry point of the React app. It renders theApp
component to the root element of the HTML template. -
src/components/TodoList.js
: This file exports a classTodoList
which is a stateful component that renders a list ofTodoItem
components. It receives an array of todo items as a prop and passes them down to theTodoItem
components. -
src/components/TodoItem.js
: This file exports a classTodoItem
which is a stateless component that renders a single todo item. It receives a todo item object as a prop and displays its title and completion status. It also has a checkbox input that toggles the completion status of the todo item. -
src/components/AddTodo.js
: This file exports a classAddTodo
which is a stateful component that renders a form to add a new todo item. It has an input field for the title of the todo item and a submit button that adds the new todo item to the list. -
src/styles/App.css
: This file contains the CSS styles for theApp
component. -
src/styles/TodoList.css
: This file contains the CSS styles for theTodoList
component. -
src/styles/TodoItem.css
: This file contains the CSS styles for theTodoItem
component. -
src/styles/AddTodo.css
: This file contains the CSS styles for theAddTodo
component. -
package.json
: This file is the configuration file for npm. It lists the dependencies and scripts for the project. -
README.md
: This file contains the documentation for the project.