vulcan-npm icon indicating copy to clipboard operation
vulcan-npm copied to clipboard

Form callbacks

Open eric-burel opened this issue 1 year ago • 0 comments

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)

eric-burel avatar Oct 03 '22 09:10 eric-burel