Warning: Text: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
darul75 opened this issue · 1 comments
darul75 commented
Hi,
It does not seem like a bug or an error but we got the following warning and you may be aware of it already
Warning: Text: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at Text (webpack-internal:///(app-pages-browser)/./node_modules/uniforms-semantic/esm/TextField.js:14:11)
at AutoField (webpack-internal:///(app-pages-browser)/./node_modules/uniforms/esm/createAutoField.js:19:42)
- Affected versions of the core, bridge, and theme packages you are aware of.
^4.0.0-alpha.5
- Steps to reproduce.
uniform within a NextJS website
- Possible workarounds, if you've found any.
not found yet
darul75 commented
Ok nothing special in fact other than a change in recent React version.
Removed:
Text.defaultProps = { type: 'text' };
In favor of:
type = 'text',
in constructor