Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to for all hooks and fix loading state examples #3

Open
yjane99 opened this issue Sep 29, 2022 · 2 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@yjane99
Copy link
Member

yjane99 commented 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!

@nikkothari22
Copy link
Member

@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 nikkothari22 changed the title Best practise to handle loading state. Update documentation to for all hooks and fix loading state examples Sep 29, 2022
@nikkothari22 nikkothari22 self-assigned this Sep 29, 2022
@nikkothari22 nikkothari22 added the documentation Improvements or additions to documentation label Sep 29, 2022
@yjane99
Copy link
Member Author

yjane99 commented Sep 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants