Closed Arhell closed 2 months ago
@meteorlxy cc
The issue is about <RouteLink>
When the page is rendered during ssr, no hash is on route path, the computed active state is false
, so <RouteLink>
won't be active in SSR result.
When a path is visited with hash, the correct <RouteLink>
will be active, and the computed state will be true. No rerender will be triggered by Vue, instead an SSR mismatch warning is outputed.
I think we'd better track how the original <RouterLink>
solves this problem.
Description
When I go to the document everything works![1](https://github.com/vuepress/core/assets/26163841/bedfcd1c-650a-4b61-bc99-f6d75d8b68fd)
When you copy the link in a line and open it in a new tab, it doesn’t work https://vuepress.github.io/guide/getting-started.html#try-it-online![2](https://github.com/vuepress/core/assets/26163841/096a32a3-05c6-4aca-931d-4def2e3d5781)
Reproduction
https://vuepress.github.io/guide/getting-started.html#try-it-online
Used Package Manager
npm
System Info