Toast after success in Remix? #546
-
I have a I tried doing it in // in action
toast.success("Settings successfully updated!!!")
return null
// in ui
return <Toaster position="top-center" /> but it didn't work. why? curious where to put a toast? |
Beta Was this translation helpful? Give feedback.
Answered by
deadcoder0904
Mar 28, 2024
Replies: 1 comment
-
found the solution: // in loader
return json({ result: submission.reply() })
// in ui
React.useEffect(() => {
if (actionData?.result.status === "success") {
toast.success("Settings successfully updated!!!")
}
}, [actionData?.result]) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
deadcoder0904
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
found the solution: