-
Notifications
You must be signed in to change notification settings - Fork 352
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
Docs for v2.0 #325
Docs for v2.0 #325
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@shuding Should we add it to the docs? https://swr.vercel.app/docs/advanced/cache#access-to-the-cache |
@koba04 Thanks for noticing this! I think it's still internal, but I marked it as "TODO" because it's a breaking change if someone relies on the old structure. So we should document this change in the 2.0 migration guide (like how we did for 1.0). |
@shuding Thank you! That makes sense, I missed the migration guide😅 |
* Empty commit for v2 branch * docs: add mutate filter functions documentation in v2 * remove the usage of cache.clear() and use mutate instead
@koba04 is the force-push for rebasing the new updates on main branch? Maybe we can leave it like this for now and cherry-pick the missing change after the major work is done. Rebasing will override the commits hash, and may have some conflicts if there's any |
@huozhi Thank you. That makes sense👍 I'll merge |
* Empty commit for v2 branch * docs: add preload API documentation in v2 * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> * Update pages/docs/prefetching.en-US.md Co-authored-by: Jiachi Liu <inbox@huozhi.im> * apply suggestions to other languages Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* Empty commit for v2 branch * docs: add DevTools documentation in v2 * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> * apply suggestions to other languages Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* Empty commit for v2 branch * docs: Nesting configurations with SWRConfig * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> * Update pages/docs/global-configuration.en-US.md Co-authored-by: Jiachi Liu <inbox@huozhi.im> * apply suggestions to other languages Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* Fetcher no longer accepts multiple arguments in v2 * Empty commit for v2 branch * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> * Update pages/docs/arguments.en-US.md Co-authored-by: Jiachi Liu <inbox@huozhi.im> * apply suggestions to other languages Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* docs: add an example for preload in effects * Update pages/docs/prefetching.en-US.md Co-authored-by: Jiachi Liu <inbox@huozhi.im> * merge examples for inside React * Update pages/docs/prefetching.en-US.md Co-authored-by: Jiachi Liu <inbox@huozhi.im> * apply a suggestion Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* docs: add the Return Values page * docs: add isLoading and keepPreviousData option * docs: fix header levels * docs: add a video for keepPreviousData * docs: move arguments page to next to return values page * docs: update diagrams for returning values * docs: update the performance document to add isLoading * docs: keep the list of return values in the options document * use isLoading instead of !data * translate options.md into Japanese * docs: add a detail link for keepPreviousData * tweak the description of isLoading * revert to move the arguments page * move the return values page into the advanced section * rename the Options page to API Options * fix links to the return values * fix a typo * add an excalidraw file for the state machine diagrams * rename the page from Return Values to Understanding SWR * rename the Options page to API * translate Understanding SWR into Japanese * tweak * change /docs/options links to /docs/api * Update pages/docs/advanced/meta.en-US.json Co-authored-by: Jiachi Liu <inbox@huozhi.im> * change the link of Understanding SWR Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* reorganize the mutation page for useSWRMutation * write paramters and return values sections for mutation * docs: add examples of useSWRMutation * add an exmple to use useSWRMutation for loading data * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* Empty commit for v2 branch * docs: add notes for Suspense on SSR and React v18 * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> * apply suggestions to other languages * Apply suggestions from code review Co-authored-by: Jiachi Liu <inbox@huozhi.im> * update other language Co-authored-by: Jiachi Liu <inbox@huozhi.im>
* fix: the hook name of useSWRMutation example * fix: optimisticData examples
add onDiscarded option
* blog improvements * update * update blog post * update mutation * update
|
docs: change the build target in the v2 blog
* Add functional rollbackOnError description * fix typo
* docs: translate v2 updates into Japanese * tweak
update card and description
* Rename laggy ui to preserving previous state * fix
This is a PR to update docs for v2.
Todos
[ ] Internal structure of the cached data (Keep all fields with one single key swr#1863)isLoading
state and refactor the core swr#1928) docs: add isLoading and keepPreviousData pages in v2 #343keepPreviousData
option swr#1929) docs: add isLoading and keepPreviousData pages in v2 #343