generated from codersforcauses/django-nextjs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
difficulty:mediumenhancementNew feature or requestNew feature or requestfrontendTask must have a front end issueTask must have a front end issue
Description
Tanstack Query official docs recommend using isPending for checking query status, rather than isLoading (https://tanstack.com/query/latest/docs/framework/react/guides/queries).
The reason for this is because checking both isError and isLoading does not actually guarantee that the data will be available. However, after isError and isPending are both checked to be false, typescript will actually narrow the type of the query data so that a check for undefined is no longer required.
Some components still use isLoading to check query status, this should be changed to isPending, and any remaining checks for the data being undefined should be removed.
Metadata
Metadata
Assignees
Labels
difficulty:mediumenhancementNew feature or requestNew feature or requestfrontendTask must have a front end issueTask must have a front end issue