A basic React app with a backend to be used in React.js interviews
A kanban board created with React.js.
Requirements:
You can check a live version of this Kanban board HERE. You can also take a look at the code, but if you copy, we will know 🙂
The API is ready and available here: https://kanban-api-rails.herokuapp.com/todos The API responds with JSON for all endpoints.
/todos
- List all tasks in the database.Response:
[
{
"id": 1,
"content": "this is the content",
"state": 1,
"created_at": "2018-05-29T09:12:57.752Z",
"updated_at": "2018-05-29T09:12:57.752Z"
},
{
"id": 2,
"content": "this is the content 2",
"state": 2,
"created_at": "2018-05-29T09:12:57.752Z",
"updated_at": "2018-05-29T09:12:57.752Z"
},
]
/todos
- Create a new task.Request:
{
todo: {
content: "this is the new content",
state: 1 // State can only possibly be: 1 - Todo, 2 - Doing, 3 - Done
}
}
Response:
{
"id": 1,
"content": "this is the new content",
"state": 1,
"created_at": "2018-05-29T09:12:57.752Z",
"updated_at": "2018-05-29T09:12:57.752Z"
}
/todos/{id}
- Update an existing task.Request:
{
todo: {
content: "this is the updated content",
state: 3 // State can only possibly be: 1 - Todo, 2 - Doing, 3 - Done
}
}
Response:
{
"id": 1,
"content": "this is the new content",
"state": 1,
"created_at": "2018-05-29T09:12:57.752Z",
"updated_at": "2018-05-29T09:12:57.752Z"
}
/todos/{id}
- Delete existing taskResponse: Empty response