react-lifecycle-methods-diagram icon indicating copy to clipboard operation
react-lifecycle-methods-diagram copied to clipboard

Implement legacy lifecycle methods

Open liyuankui opened this issue 7 years ago • 5 comments

componentWillReceiveProps() / UNSAFE_componentWillReceiveProps()
static getDerivedStateFromProps()
shouldComponentUpdate()
componentWillUpdate() / UNSAFE_componentWillUpdate()
render()
getSnapshotBeforeUpdate()
componentDidUpdate()

https://reactjs.org/docs/react-component.html

liyuankui avatar Apr 23 '18 01:04 liyuankui

Hi @liyuankui, soon-to-be-deprecated methods are not included to discourage people from using them.

wojtekmaj avatar Apr 23 '18 11:04 wojtekmaj

would be nice to have an option to show/hide legacy lifecycle methods to help with migration

atsu85 avatar Apr 23 '18 18:04 atsu85

@liyuankui Implemented legacy API: https://github.com/vivaxy/react-lifecycle-methods-diagram.

View online: https://vivaxy.github.io/react-lifecycle-methods-diagram/dist/index.html

vivaxy avatar Jul 03 '18 08:07 vivaxy

Nice! I'm actually working on a dropdown from which you will be able to choose a React version to see its diagram. @vivaxy would you mind if I merged your work at some point?

wojtekmaj avatar Jul 04 '18 07:07 wojtekmaj

@wojtekmaj It's great to have the ability to choose a React version. I'd be appreciated if you could accept my pr.

vivaxy avatar Jul 05 '18 01:07 vivaxy