react-truncate-markup icon indicating copy to clipboard operation
react-truncate-markup copied to clipboard

UNSAFE_componentWillReceiveProps warning with react 18

Open bonesoul opened this issue 3 years ago • 2 comments

next-dev.js?3515:25 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. 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

Please update the following components: TruncateMarkup

bonesoul avatar May 25 '22 14:05 bonesoul

@patrik-piskay do you have any plans to refactor the code so we can use it with React@18 strict mode? 🤔

TomasSlama avatar Feb 14 '23 09:02 TomasSlama

@patrik-piskay I would appreciate it if you could move the code under componentDidUpdate 🪄

roam-kez avatar Feb 17 '23 16:02 roam-kez