-
I think I'm missing something here, why layout fetcher is calling root GET loader instead
|
Beta Was this translation helpful? Give feedback.
Answered by
sergiodxa
Mar 17, 2024
Replies: 1 comment 3 replies
-
The first argument of fetcher.submit is the data you want to send, if there’s no data set it to null like fetcher.submit(null, {
method: "post",
action: "/user/logout"
}) Also if you’re going to use fetcher.submit in the onClick of a button, I recommend you to instead wrap the button in fetcher.Form. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
ziimakc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first argument of fetcher.submit is the data you want to send, if there’s no data set it to null like
Also if you’re going to use fetcher.submit in the onClick of a button, I recommend you to instead wrap the button in fetcher.Form.