- yarn global add json-server
- move to ./server folder
- Start json server with following command: json-server --watch db.json --port 5000
- Move to the root project folder
- Run yarn start
I had the task of implementing the change of status table. And for that purpose I used the following additional libraries:
- Axios - to interact with the Rest API
- Material-UI - for customize components.
- common folder which contains common entities for all components;
- component folder witch contains components of application
- hooks folder witch contains reusable hooks of application
- component-name.component.tsx
- component-name.interface.ts
- component-name.styles.ts
- component-name.constants.ts
- index.ts
This structure allows us not to confuse the logic of the component with styles or make it unwieldy. I made the logic to get the staff into a separate hook so that it was isolated, and it could be supplemented and replayed in the future. I used the React composition to separate the components so that these individual components could be replayed and the code cleaned.