vazco / uniforms

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

Deprecated Internal Life Cycles #690

Closed marcusyoda closed 4 years ago

marcusyoda commented 4 years ago

It is a create-react-app with the following packages installed:

{
    "@material-ui/core": "^4.5.1",
    "@material-ui/icons": "^4.5.1",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "material-auto-rotating-carousel": "^3.0.2",
    "material-ui-chip-input": "^1.0.0",
    "material-ui-image": "^3.2.2",
    "material-ui-password-field": "^2.1.0",
    "material-ui-time-picker": "^1.3.0",
    "node-sass": "^4.13.0",
    "node-uuid": "^1.4.8",
    "notistack": "^0.9.8",
    "p-queue": "^6.3.0",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-proptypes": "^1.0.0",
    "react-redux": "^7.1.0",
    "react-router-dom": "^5.1.2",
    "react-scripts": "3.4.0",
    "redux": "^4.0.4",
    "redux-thunk": "^2.3.0",
    "simpl-schema": "^1.5.5",
    "uniforms": "^2.6.1",
    "uniforms-bridge-simple-schema-2": "^2.6.1",
    "uniforms-material": "^2.6.1"
}

The functioning of the lib is correct, but it is alerting the console about react deprecated life cycles.

react-dom.development.js:12357 Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: AutoValidatedQuickMaterialForm, ErrorField, TextField
react-dom.development.js:12357 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: AutoValidatedQuickMaterialForm

Are there any plans to update the lib? Is there any way I can contribute? Analyze the update and open a PR?

Thanks for the great job with Vazco / Uniforms!

FrancoisYu commented 4 years ago

I check the closed issues, it seems that Deprecated warning has been solved in v3.

marcusyoda commented 4 years ago

@FrancoisYu thank you, I believe I looked badly before, and ended up not finding it!

Reference: #605