Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

docs(data-fetching): fix and improve example#4824

Merged
pi0 merged 3 commits intonuxt:mainfrom
salimabsi:docs/data-fetching
May 6, 2022
Merged

docs(data-fetching): fix and improve example#4824
pi0 merged 3 commits intonuxt:mainfrom
salimabsi:docs/data-fetching

Conversation

@salimabsi
Copy link

@salimabsi salimabsi commented May 5, 2022

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

  • The Refreshing Data example talks about useFetch() composable not useAsyncData() composable.
  • The return value that indicates the pending status is pending not loading.

I suggest if we add some words that say we can use refresh method returned from all data fetching composable. It will help provide better understanding, the first time I read the example, I thought the refresh method is returend only by useFetch() 😉

The docs example would be like:

You can make use of the refresh() method returned from the useFetch, useLazyFetch, useAsyncData and useLazyAsyncData composables to refresh the data with different query parameters:

@netlify
Copy link

netlify bot commented May 5, 2022

Deploy Preview for nuxt3-docs ready!

Name Link
🔨 Latest commit ce30079
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/627502a4da5865000848e01d
😎 Deploy Preview https://deploy-preview-4824--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@salimabsi salimabsi changed the title docs:(data-fetching): fix and improve example docs(data-fetching): fix and improve example May 5, 2022
@danielroe danielroe added the documentation Improvements or additions to documentation label May 5, 2022
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks 💯

@pi0 pi0 merged commit ecc8c0a into nuxt:main May 6, 2022
@pi0 pi0 mentioned this pull request May 6, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants