Your task is to create a simple React component that fetches, displays, edits, and deletes a list of todos from the JSONPlaceholder API.
-
Fetch Todos:
- Use the JSONPlaceholder API to fetch todos. API Endpoint:
https://jsonplaceholder.typicode.com/todos
- You can use native fetch API, Axios, or any other HTTP client you are comfortable with.
- API Documentation: JSONPlaceholder API
- Use the JSONPlaceholder API to fetch todos. API Endpoint:
-
Display Todos:
- Render the fetched todos in a list. Each list item should display the todo's title and completion status.
- Ensure the list is readable and user-friendly.
-
Edit and Delete Todos:
- Implement functionality to edit the title of a todo.
- Add a feature to delete a todo from the list.
- Note: Since JSONPlaceholder API does not support persistent changes, simulate these actions in the front end.
-
Error Handling:
- Implement basic error handling for the API request.
-
Code Organization:
- Structure your code in a clean and logical manner.
- Include comments where necessary to explain your logic.
- Complete this task within 1 hour.
- Fork this repository and push your code to your fork.
- Once you are done, submit the link to your repository.
- Functionality: The application works as intended, including editing and deleting tasks.
- Code Quality: Clean, organized, and commented code.
- Understanding of React concepts: Proper use of state, lifecycle methods, etc.
- Feel free to use any documentation or resources available online, including:
- React Documentation: React Docs
- Online forums like Stack Overflow.
- Google for any programming-related queries.
Good luck!