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

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Oct 7, 2021

πŸ”— Linked issue

nuxt/nuxt#11860

❓ 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

  • Remove experimental useData, useHydration and useSSRRef implementations
  • Inline internal utils:useGlobalData, ensureReactive
  • Merge asyncData into useAsyncData with simple interface and auto caching when used more than once per instance

Improvements on asyncData:

  • Main util renamed to useAsyncData
  • Reuse same instance when used than once
  • Use ref for data as it is so common an API returning non object (String, Array)
  • Reactive error
  • Support default() option
  • Rename fetch to refrash to avoid shadowing native fetch keyword

Generic:

  • Early init nuxt.payload object before plugin execution

πŸ“ Checklist

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

@pi0 pi0 changed the title cleanup data fetching into useAsyncData refactor(nuxt3): cleanup data fetching and improved useAsyncData Oct 7, 2021
@pi0 pi0 requested a review from atinux October 7, 2021 16:18
@pi0 pi0 added enhancement New feature or request nuxt3 labels Oct 7, 2021
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 7, 2021

Deploying with οΏ½?Cloudflare Pages οΏ½?Cloudflare Pages

Latest commit: 7a14554
Status:οΏ½?βœ…οΏ½? Deploy successful!
Preview URL: https://143f4a41.framework-1rm.pages.dev

View logs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x enhancement New feature or request nuxt3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants