I am trying to use an script to capture a form. But I want to extend using form events https://learn.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility#form-events
I need an example how to use this events in react app, for example for subscribe to formSubmit.