Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
See original GitHub issuei’m using react-quill with react-hooks .I got this warning
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/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://reactjs.org/link/derived-state
- Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.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: Quill
here is my code
import React, { useState } from “react”; import ReactQuill from “react-quill”; import “react-quill/dist/quill.snow.css”;
function TextEditor() { const [text, setText] = useState(“”); const handleChange = value => setText(value);
return (
<ReactQuill value={text} onChange={handleChange} />
); } export default TextEditor;
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
reactjs - componentWillReceiveProps has been renamed
js:12466 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See for details. Move data fetching code or side ...
Read more >Warning: componentWillReceiveProps has been renamed ...
componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
Read more >Warning: componentWillMount has been Renamed, and is not ...
Warning : componentWillMount has been renamed, and is not recommended for use. Initializing state // Before class AppComponent extends React.
Read more >componentWillReceiveProps has been renamed - React Studio
Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work ...
Read more >componentWillReceiveProps warning - Questions - Babylon.js
*Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m using quillv2 beta and still have this problem
The author says it’s fixed in the quillv2 beta. https://github.com/zenoamaro/react-quill/issues/564