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

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

Merged
merged 3 commits into from
Nov 10, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/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.

@danielroe danielroe 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 pi0 November 10, 2022 13:11
@danielroe danielroe self-assigned this Nov 10, 2022
@codesandbox
Copy link

codesandbox bot commented Nov 10, 2022

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

@netlify
Copy link

netlify bot commented Nov 10, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 48b5fc1
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/636cfb2f0a03fb0009271bc0

@pi0 pi0 merged commit e635134 into main Nov 10, 2022
@pi0 pi0 deleted the feat/router-composables branch November 10, 2022 13:52
@pi0
Copy link
Member

pi0 commented Nov 10, 2022

Would be nice to add docs later :)

@pi0 pi0 mentioned this pull request Nov 15, 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 enhancement New feature or request 🍰 p2-nice-to-have Priority 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