You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation for 'frappe-react-sdk' mentions handling loading state if it is validating.
However, SWR documnetation - Quick start suggests another method
that we've been already using all along. Also this discussion clarifies the confusion. If you find it appropriate, the documentation for this SDK can be amended as it returns similar states.
I hope this helps...Thank you!
The text was updated successfully, but these errors were encountered:
@yjane99 - you are correct. To be clear, isValidating is when a request is mid-flight. However, since SWR caches every request, the user should still see the old 'stale' data.
We had already started amending the documentation. The docs on the Auth hook had been updated.
However, the rest of the hooks have not been updated yet - so we need to do that. Actually, most of the documentation is pending since we have only covered 2 database hooks while there are hooks for API calls, Search, other CRUD operations and File upload. We need to write documentation for all these as well.
nikkothari22
changed the title
Best practise to handle loading state.
Update documentation to for all hooks and fix loading state examples
Sep 29, 2022
Documentation for 'frappe-react-sdk' mentions handling loading state if it is validating.
However, SWR documnetation - Quick start suggests another method
that we've been already using all along. Also this discussion clarifies the confusion.
If you find it appropriate, the documentation for this SDK can be amended as it returns similar states.
I hope this helps...Thank you!
The text was updated successfully, but these errors were encountered: