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

feat(nuxt): add onBeforeRouteLeave and onBeforeRouteUpdate composables - #8889

Merged
pi0 merged 3 commits into
mainfrom
feat/router-composables
Nov 10, 2022
Merged

feat(nuxt): add onBeforeRouteLeave and onBeforeRouteUpdate composables#8889
pi0 merged 3 commits into
mainfrom
feat/router-composables

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#15430

❓ 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 adds onBeforeRouteLeave and onBeforeRouteUpdate composables, both for universal and vue-router implementations.

It also hotfixes an issue where changes to preset sources were persisting across nuxt restarts. (We should likely resolve this later in kit module options resolution.)

📝 Checklist

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

@danielroedanielroe added enhancement New feature or request 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Nov 10, 2022
@danielroe
danielroe requested a review from pi0November 10, 2022 13:11
@danielroedanielroe self-assigned this Nov 10, 2022
@codesandbox

Copy link
Copy Markdown

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

@netlify

netlifyBot commented Nov 10, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit48b5fc1
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/636cfb2f0a03fb0009271bc0

Comment threadpackages/nuxt/src/pages/module.ts
pi0
pi0 approved these changes Nov 10, 2022
@pi0
pi0 merged commit e635134 into mainNov 10, 2022
@pi0
pi0 deleted the feat/router-composables branch November 10, 2022 13:52
@pi0

pi0 commented Nov 10, 2022

Copy link
Copy Markdown
Member

Would be nice to add docs later :)

@pi0pi0 mentioned this pull request Nov 15, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xenhancementNew feature or request🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto import vue router navigation guards

2 participants

@danielroe@pi0