The goal of this task was to create an app with the functionality of Task Manager. The user should be able to add a task with chosen name using a form. A "start/stop" button has toggle functionality that starts or stops the timer that counts from 0. The timer should be displayed in 00:00:00 format. The button "done" stops the timer, enables the "remove" button, and pushes the task to the bottom of the display. The "remove" button removes the task from the display but keeps it inside the state array. The app uses a local API to store and update a task's information.
- Clone git repository and open file on your local device in Code editor.
- Run
npm install
command to install all npm packages. - Run
json-server --watch ./db/data.json --port 3005
command. - Run
npm start
command to open developer mode.
Localhost port: http://localhost:8080/index.html
- React
- CSS
- Flexbox
- Webpack
During coding this challenge I had a chance to get a basic understanding of React. I had a chance to build a controlled form component and practice using and updating the state. I learned that state should never be mutated and mutating does not trigger re-render in React. Instead of assignment operator we should always use setState() method. This method is asynchronous and does not mutate the original state. Because of this, we can track changes. In this task, I did not split my code into components on purpose to not over complicated it at the moment of writing. I refreshed my knowledge about API and intervals and put it into use in React. Another important lesson was to practice working with events in React.
I will keep learning React, soon I will refactor my Task Manager into separate components.
- Official React website - Documentation. Every question regarding React answered.
- CSS Tricks - Articles with React tag.
- Website - Axseinga
- Frontend Mentor - @Axseinga
- LinkedIn - Agnieszka Urbanowicz
Thanks to my Mentor - devmentor.pl - for providing me with this task and for code review.