vulcan-npm
vulcan-npm copied to clipboard
Form callbacks
Describe the bug
- addSuccessCallback/addFailureCallback, that can be called from a child component to enhance the context, leads to infinite loop. Those functions modify the state, so maybe there is another loop that runs on callbacks, modifying it as well?
- those callbacks are not used anyway...
- callbacks should be passed to the form via top-level props and then spread into the context. We can probably initialize the context accordingly.
Expected behavior User can set callbacks from form, and can safely call the "addCallback" methods from within another component (or we deprecate this altogether)