Skip to content

Instantly share code, notes, and snippets.

View iMaximal's full-sized avatar

Maxim Golitsyn iMaximal

View GitHub Profile
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 21, 2026 08:05
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@bvaughn
bvaughn / react-lifecycle-cheatsheet.md
Last active July 12, 2026 14:01
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount ✓ Constructor equivalent for createClass
render Create and return element(s)
componentDidMount ✓ ✓ DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps ✓ Update state based on changed props