`useNavigate` inside an `action`?

I am trying to use useNavigate in an action when my form is submitted. However my page isn't navigating. No errors appear in console.
const some_action = action(async (data) => {useNavigate()("/")})

...
<form action={some_action}>
const some_action = action(async (data) => {useNavigate()("/")})

...
<form action={some_action}>
2 Replies
TaQuanMinhLong
i think in action you can just throw redirect instead https://docs.solidjs.com/solid-router/reference/data-apis/action
Eatham
EathamOP4d ago
Thanks
Want results from more Discord servers?
Add your server