Replies: 2 comments 9 replies
-
Are you redirecting as in the example? export async function action({ params }) {
await deleteContact(params.contactId);
return redirect("/"); <------
} |
Beta Was this translation helpful? Give feedback.
6 replies
-
@sergiodxa could you give me an example of what do you mean? Let's say I have something like in the loader: return new Response('', {
status: 405,
statusText: 'Method Not Allowed',
headers: {
Allow: 'POST',
},
}); How would you "customize it"? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the React Router Tutorial in the Deleting Records section it is described that in order to handle delete one can create a new
Route
:Is this the best/recommended way for handling such interactions?
I wonder because now we end up with a
Route
without an element. If the user navigates to/contacts/:contactId/destroy
then he will see an empty page. There will also be a warning logged:Beta Was this translation helpful? Give feedback.
All reactions