vazco / uniforms

A React library for building forms from any schema.
https://uniforms.tools
MIT License
1.95k stars 240 forks source link

Warning: Text: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #1349

Closed darul75 closed 3 months ago

darul75 commented 4 months ago

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)

^4.0.0-alpha.5

uniform within a NextJS website

not found yet

darul75 commented 3 months ago

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