Prepare to interview
Installing
- Clone this repo and use this command:
npm install
- Run server with
npm run dev
Please, don't watch files. This is example
Tasks
- Install React + TypeScript
npm create vite@latest
- Install Axios
npm install axios
- Create component
<Block />with 2 props - title and children. It can be useful in the future
<Block title="Title">
<div>This is description</div>
</Block>
- Create interface about Post using this data:
[
{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
},
{
"userId": 1,
"id": 2,
"title": "qui est esse",
"body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
},
]
- Create
<PostList />element where we have one propposts. In the PostList you need to iterate<PostItem />. If we don't have posts, we need to show textNot Foundor smth similar.
Place it in
<App />
- In the
<App />you need to fetch data from api endpoint using axios and place all posts to<PostList />
- Create
<PostListControl />with button refresh. This button need to refresh this list from api.
Place it in the
<App />In
<PostListControl />you need to place 2 props: refresh and setRefresh
- Add search field for
<PostListControland we need to filter these posts.
Use
arr.filterin the<App />
Description
Languages
TypeScript
48.1%
CSS
35.6%
HTML
8.8%
JavaScript
7.5%