React-md: Warnings in strict mode

Created on 30 Jan 2019  路  1Comment  路  Source: mlaursen/react-md

Description

I'm getting a few warnings in the console using StrictMode:

```
Warning: Unsafe lifecycle methods were found within a strict-mode tree:
in StrictMode

componentWillMount: Please update the following components to use componentDidMount instead: CSSTransitionGroupChild, Drawer, TransitionGroup

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Button, Drawer, FontIcon, InkContainer, NavigationDrawer, TransitionGroup

componentWillUpdate: Please update the following components to use componentDidUpdate instead: Button

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings


Warning: Legacy context API has been detected within a strict-mode tree:
in StrictMode

Please update the following components: Card, Drawer, NavigationDrawer, withInk(withTooltip(Button))

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings


Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of TransitionGroup which is inside StrictMode. Instead, add a ref directly to the element you want to reference.

in div (created by TransitionGroup)
in TransitionGroup (created by InkContainer)
in InkContainer (created by withInk(withTooltip(Button)))
in button (created by Button)
in Button (created by withTooltip(Button))
in withTooltip(Button) (created by withInk(withTooltip(Button)))
in withInk(withTooltip(Button)) (created by NavigationDrawer)
in header (created by Paper)
in Paper (created by Toolbar)
in Toolbar (created by NavigationDrawer)
in div (created by NavigationDrawer)
in NavigationDrawer (created by App)
in App
in StrictMode

Learn more about using refs safely here:
https://fb.me/react-strict-mode-find-node


Warning: Unsafe lifecycle methods were found within a strict-mode tree:
in StrictMode

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Portal

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings


Warning: Legacy context API has been detected within a strict-mode tree:
in StrictMode

Please update the following components: JumpToContentLink, Overlay

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings
```

Link to a gist or code sample where the issue can be reproduced

https://codepen.io/Dbuggerx/pen/bzBbEO

(Look at the browser console)

Version

  • React - 16.7.0
  • React-MD - 1.9.2

BTW, awesome library :clap: !

bug enhancement

Most helpful comment

Thanks for the heads up! I think I might target this with my v2 release I'm working on instead of trying to fix it pre-v2. The newer lifecycle methods aren't that great IMO and have caused more issues when switching over; at least my experience at my work. I'm hoping the v2 release will fix the other underlying issues in this project as well, the only downside is the timeline :/

>All comments

Thanks for the heads up! I think I might target this with my v2 release I'm working on instead of trying to fix it pre-v2. The newer lifecycle methods aren't that great IMO and have caused more issues when switching over; at least my experience at my work. I'm hoping the v2 release will fix the other underlying issues in this project as well, the only downside is the timeline :/

Was this page helpful?
0 / 5 - 0 ratings