Tag view

#lifecycle

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with lifecycle

2 cards

React Hard Theory

shouldComponentUpdate, getDerivedStateFromProps, getSnapshotBeforeUpdate, and hooks vs lifecycle coverage

Some class lifecycle methods exist for optimization, derived state, or pre-commit DOM reads, and hooks do not map one-to-one with every lifecycle scenario.

  • shouldComponentUpdate controls update skipping
  • getDerivedStateFromProps is niche and often misused
  • getSnapshotBeforeUpdate captures DOM info before commit

shouldComponentUpdate, getDerivedStateFromProps, getSnapshotBeforeUpdate, and hooks vs lifecycle coverage