This TodoList application is developed as part of an assignment for a frontend task. It showcases skills in building and styling applications using React.js.
- Task Management: Add, edit, and delete tasks effortlessly.
- Task Details: Each task includes a title, description, creation date, and status (indicating whether it's done or not).
- React: Utilizing hooks such as
useState
anduseEffect
for effective state management and side effects. - Axios: Used for making API calls to the backend server.
-
State Management:
- The application employs React hooks to manage tasks, including the new task being added and the current editing state.
-
Fetching Tasks:
- On app initialization, it communicates with the server using
useEffect
to retrieve the initial list of tasks.
- On app initialization, it communicates with the server using
-
Adding Tasks:
- A dedicated function,
handleAddTask
, is implemented to add new tasks. It validates input, creates a task object, updates the list, and sends a POST request to the server.
- A dedicated function,
-
Toggling Task Status:
- The
handleToggleDone
function allows users to toggle the completion status of tasks. This updates both the local list and the server via a PUT request.
- The
-
Deleting Tasks:
- Want to remove a task? The
handleDeleteTask
function takes care of that by removing the task locally and notifying the server with a DELETE request.
- Want to remove a task? The
-
Editing Tasks:
- The application supports editing through the
handleEditTask
function, which sets the task for editing, preparing it for the next steps.
- The application supports editing through the
-
Saving Edits:
- Once edits are complete, the
handleSaveEdit
function saves the changes. It updates the task list and informs the server of the modifications through another PUT request.
- Once edits are complete, the
- The app displays all tasks with their details and includes a checkbox for marking them as done. Users can easily edit or delete each task as needed.
- Clone the repository:
git clone https://github.com/Tejasshack/APTCODER_FrontEnd_Assignment.git cd APTCODER_FrontEnd_Assignment
Install dependencies:
Copy code npm install Start the application:
Copy code npm start Feedback I know it's not overly complex, but it represents a solid start. I'm still on my learning journey, so any feedback is greatly appreciated!
License This project is open-source and available under the MIT License.
markdown Copy code
- Copy and Paste: Simply copy the above Markdown content into a file named
README.md
in the root directory of your TodoList project. - Adjust Links: If necessary, adjust any URLs or links based on your project's actual repository structure or license information.
- Commit Changes: Add, commit, and push your
README.md
to your GitHub repository.
Feel free to customize any part of the README as per your preference! If you need further assistance