react-amplitude
react-amplitude copied to clipboard
Rename unsafe lifecycles
componentWillMount and componentWillReceiveProps are not recommended to use. From React 17.x, only the UNSAFE_ name will work. UNSAFE alias was introduced in React version 16.3.
Had to also disable eslint for camelcase rule.
In the future, we can use componentDidMount instead of componentWillMount and componentDidUpdate instead of componentWillReceiveProps.
I think we should fix the underlying problem considering how little amplitude communicates.
I think we should fix the underlying problem considering how little amplitude communicates. Related to unsafe lifecycles?
I think we should replace these lifecycle methods. We should use componentDidMount
instead of componentWillMount
and componentDidUpdate
instead of componentWillReceiveProps
.
But, that should be properly tested. So, before making that change I think we should just use the UNSAFE
prefix first so that anyone can jump to 17.x
when it arrives.
Can this be merged soon so I stop seeing warnings? :)