Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor requesting data from API with new useApiRequest custom hook #166

Open
iburakov opened this issue Jun 23, 2021 · 0 comments
Open
Labels
ts TypeScript

Comments

@iburakov
Copy link
Collaborator

Now API requests for data are done with useEffect hook and useState vars. It can be generalized with new useApiRequest custom hook implemented for this purpose for all components where data is requested with server API.

Example of refactoring: 7b607d1. See useApiRequest usage for more.

Further parametrization of the hook (including useApiRequest.tsx modification) may be required.

@iburakov iburakov added the ts TypeScript label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ts TypeScript
Projects
None yet
Development

No branches or pull requests

1 participant