Skip to content

Instantly share code, notes, and snippets.

View sapegin's full-sized avatar
🌄
Disconnected

Artem Sapegin sapegin

🌄
Disconnected
View GitHub Profile
@sapegin
sapegin / react-lifecycle-cheatsheet.md
Last active July 8, 2017 09:27 — forked from bvaughn/react-lifecycle-cheatsheet.md
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
@sapegin
sapegin / table.md
Last active December 28, 2015 07:29 — forked from jkschoen/table.md

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

@sapegin
sapegin / JsCodeStyle.md
Last active October 14, 2015 01:07 — forked from sindresorhus/codestyle.md
My JavaScript Code Style

JavaScript Code Style

  • Tab indentation
  • Single-quotes
  • Semicolon
  • camelCase
  • Strict mode
  • No trailing whitespace
  • Variables where needed
  • Multiple variable statements