SolidJSS
SolidJSโ€ข2y agoโ€ข
12 replies
dohn

Do something when a submission ends if there's more than 1 action

Hey everyone. For showing user feedback (like a toast) when an action was done I was checking the action.result inside a
createEffect
where action is the returned value from useSubmission(myAction)

This has been working fine but breaks the moment I use more than one useSubmission in the same component. All effects run on success even if just one action was fired (in my case showing multiple toasts)

What's the pattern for handling this?
Was this page helpful?