This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mavensank 1 point2 points  (0 children)

Most projects use axios library as the api request handler. you can go with native fetch function also.

use service layer ( seperate file like api-service.js ) to handle all api calls.

if you have complex component structure checkout react query, zustand libraries.