Throw vs return in router’s action

Suppose I have an action that should redirect.

In the docs(https://docs.solidjs.com/solid-router/reference/data-apis/action) I found example of both returning and throwing a redirect.

Which should be used and when?
Was this page helpful?