Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Promisify all model.tsx functions #264

Open
mtfranchetto opened this issue Aug 18, 2022 · 0 comments
Open

Promisify all model.tsx functions #264

mtfranchetto opened this issue Aug 18, 2022 · 0 comments
Labels
tech-debt Legacy issues or new tools adoption

Comments

@mtfranchetto
Copy link
Contributor

Description

Before introducing react-query we have handled every request to an API using callbacks (see model.tsx).
This is not a best practice for many reasons, and most of all, callbacks cannot be used with react-query, as they library expects a Promise from the data loader function.

Following what has been done in #175 we should replace all model.tsx functions still using callbacks, and make them return Promises, which can then be used by react-query for an efficient data retrieval.

@mtfranchetto mtfranchetto added the tech-debt Legacy issues or new tools adoption label Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tech-debt Legacy issues or new tools adoption
Projects
None yet
Development

No branches or pull requests

1 participant