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

feat(nuxt): add dev warnings when setPageLayout is used incorrectly #8464

Merged
merged 1 commit into from Oct 25, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#15176

❓ 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

This PR adds warnings in dev mode when setPageLayout is used in a location where it will cause a hydration mismatch.

πŸ“ Checklist

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

@danielroe danielroe added enhancement New feature or request dx labels Oct 25, 2022
@danielroe danielroe requested a review from pi0 October 25, 2022 12:09
@danielroe danielroe self-assigned this Oct 25, 2022
@codesandbox
Copy link

codesandbox bot commented Oct 25, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Oct 25, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 973b1b8
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6357d1de78b5280009a4a2a5

@pi0 pi0 merged commit 91eab1b into main Oct 25, 2022
@pi0 pi0 deleted the feat/set-layout-warnings branch October 25, 2022 12:25
@pi0 pi0 mentioned this pull request Nov 3, 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 dx enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling setPageLayout() before page mount does not render properly
2 participants