The-Commit-Company/frappe-react-sdk

Update documentation to for all hooks and fix loading state examples

yjane99 opened this issue · 2 comments

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!

@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.

I appreciate you clarifying this. If there is anything that I can help, I'm up.