Skip to content

fix: Update useAsyncData and useFetch to include status and clear properties#158

Open
zhaolinlau wants to merge 1 commit intonuxtrdev:mainfrom
zhaolinlau:main
Open

fix: Update useAsyncData and useFetch to include status and clear properties#158
zhaolinlau wants to merge 1 commit intonuxtrdev:mainfrom
zhaolinlau:main

Conversation

@zhaolinlau
Copy link
Copy Markdown

🔗 Linked issue / Discussion

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

'pending' is deprecated, and now 'status' will return the status of the data request ("idle", "pending", "success", "error"). And the clear function can be used to set the fetched data to undefined and set error to null.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Replace 'pending' with 'status' and add 'clear' function
@zhaolinlau zhaolinlau changed the title feat: Update useAsyncData and useFetch to include status and clear properties fix: Update useAsyncData and useFetch to include status and clear properties Sep 10, 2024
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.

1 participant