fulcro

Yaw Odame 2024-10-17T20:18:37.254969Z

I am currently refactoring some logic to a uism. How would you call fs/add-form-config in an event handler? Or is that an anti-pattern?

👀 1
tony.kay 2024-10-17T20:46:17.505009Z

That is totally fine. Use uism/apply-action I think it’s called, and the mutation helper version of that

tony.kay 2024-10-17T20:46:38.197409Z

You can look at the RAD form UISM for an example of handling forms with UISM

tony.kay 2024-10-17T20:46:44.140279Z

(including nested forms etc)

tony.kay 2024-10-17T20:47:34.004479Z

look at the stuff around add-row

tony.kay 2024-10-17T20:48:44.423529Z

So, while you’re at it, consider refactoring to RAD 😄

Yaw Odame 2024-10-17T21:12:35.260759Z

I thought about the gains with RAD. I have custom filled components built on top of headless UI. It might be worth leveraging RAD in the end.

Yaw Odame 2024-10-17T21:28:55.597479Z

uism/apply-action to the rescue. Cheers!