Fix warnings when using with React 16.x.x
athornton2012 opened this issue · 2 comments
athornton2012 commented
We are using pivotal-ui with react 16.8.6. Ever since we upgraded to react 16.x.x we see several warnings for pivotal-ui components that look like this:
* 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: TooltipTrigger
It would be great if these components were updated so that the warnings disappear, and because componentDidUpdate
will be deprecated with react 17.x.x.
kennyw12 commented
Hi, what version of PUI are you using? We've added a fix for this in v19 and v18 will that fix this for you? (new npm versions have not yet been released)
athornton2012 commented
We are using v18. Awesome, thanks for the update! Closing since we can just bump to v19.