#Change URL and render the page matching to the <Route>

13 messages · Page 1 of 1 (latest)

fathom remnant
#

I am new to solid and frontend in general and I was wondering how I can change the URL of the app.
I am authenticating my users on the homepage / and I want to redirect users to /submit
I have a signal called isAuthenticated and an effect that is checking if it changed to true and then I want to redirect. Having used react a little bit, I know useNavigate exists, looking for how to do it in Solid.

gray sand
#

Using solid start?

#

Or solid-router?

#

If yes you can do this

const navigate = useNavigate()
navigate("/whatever")
fathom remnant
gray sand
#

neovim?

fathom remnant
gray sand
#

Which lsp?

fathom remnant
#

tsserver

gray sand
#

Weird probably your tsconfig is messed up

fathom remnant
#

oh wait, looks like a restart fixed it

#

Lsp restart

#

thanks for the help!