Skip to content

Rewrite url after data hook #1843

Sep 3, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

I fixed with:

// +Page.tsx

import { onMount } from 'solid-js'

export const Page = () => {
  onMount(() => {
    if (<SOME_CONDITION>) {
      // Update route path (no reload)
      globalThis.history.replaceState(null, '', <NEW_URL>)
    }
  })

  return (...)
}

Related to this use case, maybe #1846 isn't necessary to implement it.

FYI @brillout

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@rtritto
Comment options

@brillout
Comment options

@rtritto
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rtritto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants