Simple todo progressive web app using React.
Live Demo: https://agusmafud.github.io/todoapp/
- React for component-based and declarative architecture.
- Reacts Hooks for building functional stateless components.
- create-react-app as frontend build pipeline.
- Material-UI: React UI framework.
- SASS + BEM as css styling solution.
- React transition group for visual animations.
- PropTypes for typechecking.
todoapp
└── src
├── TodoApp.js
├── containers\TodosContainer
├── components
│ ├── views\Todos
│ ├── layouts\FullHeightCardLayout
│ └── elements
│ ├── Todo
│ ├── NewTodoInput
│ └── CompletedTodos
└── utils
│ ├── messages
│ └── propTypesConstants
└── docs
App entrypoint. Implements Material-UI theme and calls the main and only app container.
Containers hold app logic. In this todo app, TodosContainers:
- creates the state that will hold todo notes using useState hook,
- defines the logic for altering todos,
- verifies with a custom hook the viewports size,
- bubbles this data and functions via properties to the corresponding Todos view component.
This app has only one view, which has the following responsabilities:
- Implementing a layout component and all the element components involving the view.
- Applying the visual transitions and animations.
Simple layout component with desktop and mobile styles that renders an optional title and a card holding the main content.
Elements are simple components which only responsability is to render content based on their properties. They also hold the css styles and are the blocks in the BEM styles structure.
- message: Main file for texts and aria labels.
- propTypesConstants: Main file for propTypes shapes.
Folder with build compilation running under github pages on https://agusmafud.github.io/todoapp/.