-
Notifications
You must be signed in to change notification settings - Fork 0
Outline and document the use of react-router and react-query to load and manage asynchronous data state, using orval to generate the API client #21
Comments
On initial investigation, the project is certainly more active. The generator writes an Some standout features:
The proposal would be to move to:
|
Orval is accepted as a plugin. This ticket is being renamed to reflect the use of |
This has been mostly prototyped and merged into My implementation has the following differences:
|
Studying this syntax essentially the values from the response are being assigned to the const { isLoading, error, data } = useQuery({
queryKey: ['repoData'],
queryFn: () =>
fetch('https://api.github.com/repos/tannerlinsley/react-query').then(
(res) => res.json(),
),
}) Using |
Orval is a restful client generator for Typescript with documentation for React. It does use Axios under the hood, while being an added layer could bring utilities like
interceptors
.OTC our preferred project at the moment seems to be unmaintained.
The proposal is to evaluate this library and prototype a sample and decide if it's worthwhile moving to this project.
If this is accepted then we have to redo our documentation and ensure this permeates through projects that are using the current approach.
The text was updated successfully, but these errors were encountered: