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

docs(middleware): add navigateTo options - #5044

Merged
pi0 merged 3 commits into
nuxt:mainfrom
TheAlexLichter:docs/navigateTo
May 20, 2022
Merged

docs(middleware): add navigateTo options#5044
pi0 merged 3 commits into
nuxt:mainfrom
TheAlexLichter:docs/navigateTo

Conversation

@TheAlexLichter

Copy link
Copy Markdown
Member

🔗 Linked issue

Related and resolves partially: nuxt/nuxt#13993

❓ 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

Adds info about the NavigateToOptions for navigateTo. Also removes the info that it can only be called on client side.

📝 Checklist

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

@netlify

netlifyBot commented May 18, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commit7b15ca0
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62850ffe1b9e4f00085d7b32
😎 Deploy Previewhttps://deploy-preview-5044--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@danielroedanielroe added the documentation Improvements or additions to documentation label May 18, 2022
Comment threaddocs/content/2.guide/3.directory-structure/7.middleware.md Outdated
Comment threaddocs/content/2.guide/3.directory-structure/7.middleware.md Outdated
TheAlexLichterand others added 2 commits May 18, 2022 17:25
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Daniel Roe <daniel@roe.dev>
Nuxt provides two globally available helpers that can be returned directly from the middleware:

1. `navigateTo (route: string | Route)` - Redirects to the given route, within plugins or middleware. It can also be called directly on the client side to perform page navigation.
1. `navigateTo (route: string | Route, options: { redirectCode: number, replace: boolean )` - Redirects to the given route, within plugins or middleware. It can also be called directly to perform page navigation.

@pi0pi0May 20, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: We could also expose permanent: boolean flag! /cc @danielroe

@pi0pi0 changed the title docs: add navigateTo optionsdocs(middleware): add navigateTo optionsMay 20, 2022
pi0
pi0 approved these changes May 20, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0
pi0 merged commit 557c40c into nuxt:mainMay 20, 2022
@TheAlexLichter
TheAlexLichter deleted the docs/navigateTo branch May 20, 2022 10:05
@pi0pi0 mentioned this pull request Jun 10, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xdocumentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TheAlexLichter@pi0@danielroe