Right now redirect_to is handled in every action. It would be nice to refactor this out in some way so the developer doesn't have to worry at all about this... maybe in the hook or something?
I believe I tried this a while back and there was some issue with separating between entering a form action and handling the response to a successful form action. We would only want to redirect on the latter case.
I had previously done this by creating an enhance function for actions but this would lose the types from Svelte. Not sure how to do this while maintaining these useful form action types.
Right now
redirect_to
is handled in every action. It would be nice to refactor this out in some way so the developer doesn't have to worry at all about this... maybe in the hook or something?I believe I tried this a while back and there was some issue with separating between entering a form action and handling the response to a successful form action. We would only want to redirect on the latter case.
I had previously done this by creating an enhance function for actions but this would lose the types from Svelte. Not sure how to do this while maintaining these useful form action types.