S
SolidJS5d ago
dtnc

Clearing form after action in solid-start

Searches on this discord return old posts that suggest using createEffect on submission.pending along with a ref to the form to do clearing. I'm just checking if this is still the right way to handle form clearing after successful actions. Please let me know if you have a better suggestion. Thanks
2 Replies
peerreynders
peerreynders4d ago
You can specify an onComplete(submission) handler on the action options which could be leveraged in that capacity. I was added for @solidjs/router 0.15.0
GitHub
solid-router/CHANGELOG.md at c05ce351b584a8db2247ddb7863915fdbfc332...
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
GitHub
solid-router/src/data/action.ts at c05ce351b584a8db2247ddb7863915fd...
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
dtnc
dtncOP4d ago
thank you so much for taking the time to write thoughtful responses, and with reference links!

Did you find this page helpful?