Skip to content

scrollBehavior example in RouterOptions #160

Answered by frandiox
Lord-Y asked this question in Q&A
Discussion options

You must be logged in to vote

routerOptions is an object:

export default viteSSR(
  App,
  {
    routes,
    routerOptions: {
      scrollBehavior(...) {
         return ...
      }
    },
    transformState(state) {
      return import.meta.env.SSR ? devalue(state) : state
    },
  },
  () => {...}
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lord-Y
Comment options

Answer selected by Lord-Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants