vazco/uniforms v3.0.0-alpha.3 Release Notes

Release Date: 2020-05-06 // almost 4 years ago
    • ๐Ÿ’ฅ Breaking: Removed BaseForm.getChangedKeys. Use changedKeys directly.
    • ๐Ÿ’ฅ Breaking: Removed default exports in the uniforms package. Use named imports instead (e.g. import { BaseForm } from 'uniforms'). This allows to effectively export types along with values.
    • ๐Ÿ’ฅ Breaking: Removed createSchemaBridge. This includes removal of BaseForm.state.bridge, check on all bridges, and the automatic bridge creation for SimpleSchema. For motivation and more insigths see #718.
    • ๐Ÿ’ฅ Breaking: Reworked validation flow. For motivation and more insigths see #711.
      • Bridge validators can be asynchronous.
      • Bridge validators have to return errors instead of throwing them.
      • onValidate is no longer using callbacks. The error (or the lack of it) has to be returned either synchronously or asynchronously (i.e. wrapped in a promise).
      • onSubmitSuccess and onSubmitFailure got removed. To preserve the current behavior, simply combine them into the onSubmit: diff -onSubmit={onSubmit} -onSubmitSuccess={onSubmitSuccess} -onSubmitFailure={onSubmitFailure} +onSubmit={model => { + const result = onSubmit(model); + result.then(onSubmitSuccess, onSubmitFailure); + return result; +}}`
    • ๐Ÿ”„ Changed: For performance reasons getField, getSubfields, and getType of all bridges are now memoized.
    • ๐Ÿ”„ Changed: For performance reasons filterDOMProps.registered is now readonly string[] instead of string[]. Internally, omit got replaced with pickBy and filterDOMProps.registered is now sorted. filterDOMProps.register behavior remains unchanged.