Replies: 1 comment
-
you can use a custom hook like this `export default function useFormEvent(action: ActionType) { // do anything with your state |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there! 😊
I'm wondering what's the most effective way to display a toast message based on data known in a server component.
toast()
might not be feasible in a server component, asToaster
is specifically a client component, even ifrsc
is set to true.toast()
withinuseEffect
doesn't seem like the best option either, since I want to avoid displaying the toast every time useEffect runs. I'd prefer to batch the toasts and show them only once.Beta Was this translation helpful? Give feedback.
All reactions