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

docs: add revalidate in the documentation #70

Closed
wants to merge 1 commit into from

Conversation

koba04
Copy link
Collaborator

@koba04 koba04 commented Jan 25, 2021

Currently, there is no documentation for revalidate that useSWR returns.
So I've added it to the documentation.

(Prettier has automatically removed whitespaces in end of line. If it shouldn't be, I'll remove it from the diffs)

@vercel
Copy link

vercel bot commented Jan 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/swr-site/cn7595or8
✅ Preview: https://swr-site-git-fork-koba04-add-revalidate-method-in-docs.vercel.now.sh

Copy link
Member

@shuding shuding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This is actually intended — we used to have both revalidate and mutate documented in the early version (0.1.x), but then realized that mutate() covers the same use case and it's better to only maintain 1 API. To stay backwards compatible, we still keep the API but not the documentation. And in 1.x we will deprecate this API.

@shuding shuding closed this Jan 27, 2021
@koba04 koba04 deleted the add-revalidate-method-in-docs branch January 28, 2021 00:58
@koba04
Copy link
Collaborator Author

koba04 commented Jan 28, 2021

@shuding
Thank you for your explanation! That makes sense for me.
Could I add a comment for the intention into the source code to avoid using it by developers who find it?

shuding added a commit that referenced this pull request Jun 6, 2021
* feat: Add japanese translate (#47)

* doc: translate "Global Configuration" page into Japanese (#48)

* doc: translate "Data-Fetching" page into Japanese (#50)

* docs: Add Japanese markdown or mdx files (#54)

* doc: translate "API Options" page into Japanese (#56)

* doc: translate "Top" page into Japanese (#55)

* doc: translate "Conditional Fetching" page into Japanese (#57)

* doc: translate "mutation" page into Japanese (#58)

* doc: translate "Suspense" page into Japanese (#60)

* doc: translate "Change Log" page into Japanese (#62)

* doc: translate "Prefetching Data" page into Japanese (#59)

* doc: translate "Automatic Revalidation" page into Japanese (#63)

* doc: translate "Getting Started" page into Japanese (#61)

* doc: translate "Arguments" page into Japanese (#64)

* doc: translate the swr title into Japanese (#71)

* doc: translate "Advanced Performance" page into Japanese (#65)

* doc: translate "Error Handling" page into Japanese (#69)

* doc: translate the side menu into Japanese (#72)

* doc: translate "Usage with Next.js" page into Japanese (#70)

* doc: translate "pagination" page into Japanese(#73)

* doc: proofread "Top" page (#77)

* doc: proofread "Global Configuration" page (#81)

* doc: proofread "Getting Started" page (#79)

* doc: proofread "Error Handling" page (#83)

* doc: proofread "Conditional Fetching" page (#85)

* doc: proofread "Pagination" page (#87)

* doc: proofread "Usage with Next.js" page (#89)

* docs: proofread the doc pages (#91)

* fix: resolve conflicts (#93)

* Fix code example in data-fetching.zh-CN.mdx (#90)

* Add license (#93)

* Add license

* Update license.md

Co-authored-by: Paco <[email protected]>

Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>

* update perf page (#92)

* I18n: Spanish (#96)

* feat: added support for Spanish language

* doc(language): now the footer text is on Spanish

* docs(language): I18: Snpanish

* docs(language): Added metadata Spanish

* docs(language): I18 index spanish page

* docs(language): I18 Getting started to spanish

* docs(language): I18 Change log page to Spanish

* feat(I18): Add metadata related to the example to Spanish

* docs(I18): Basic use to the Spanish

* docs(I18): Auth page to Spanish

* docs(I18): Handleing error page to Spanish

* docs(I18): Inifinite loading page to Spanish

* feat(I18-spanish): added metadata related with advances section

* docs(I18): Translated to Spanish

* docs(I18): Added metadata related with documentation section

* refactor: fix typo

* docs(I18): Option translated to Spanish

* docs(I18): Configuration global page translated to Spanish

* docs(I18): Data fetching page translated to Spanish

* docs:(I18): Error handling page translated to Spanish

* refactor: Fixy typo

* docs(I18): Automatic revalidation page translated to Spanish

* docs(I18): Conditional data fetching page translated to Spanish

* docs(I18): Arguments page translated to Spanish

* docs(I18) Mutation page translated to Spanish

* docs(I18): Pagination page translated to Spanish

* docs(I18): Prefetching page translated to Spanish

* docs(I18): Usage with Next.js page translated to Spanish

* docs(I18): Suspense page translated to Spanish

* refactor: performance page

* docs(readme): Improving credits and add one more. (#97)

* i18n: add Japanese

Co-authored-by: Fang Lu <[email protected]>
Co-authored-by: Joe Cohen <[email protected]>
Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>
Co-authored-by: Markoz Peña <[email protected]>

* Revert "fix: resolve conflicts (#93)"

This reverts commit b29c7b8.

* feat(i18n): add Japanese (#95)

* doc: update translation of "Performance" page (#98)

* doc: add Japanese translators to README.md (#99)

* doc: fix the feature section of top page (#101)

Co-authored-by: Tomohiro (Tomo) SHIOYA <[email protected]>
Co-authored-by: Fang Lu <[email protected]>
Co-authored-by: Joe Cohen <[email protected]>
Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>
Co-authored-by: Markoz Peña <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants