Skip to content

Instantly share code, notes, and snippets.

@jcreamer898
Last active May 21, 2018 10:37
Show Gist options
  • Save jcreamer898/aeaf4b7a08b9871c3a48ad4bb7ccb35c to your computer and use it in GitHub Desktop.
Save jcreamer898/aeaf4b7a08b9871c3a48ad4bb7ccb35c to your computer and use it in GitHub Desktop.

Revisions

  1. jcreamer898 revised this gist Jun 1, 2017. No changes.
  2. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------------------------------------------|----------------------------------------------------------|
    | constructor | initialize() | nope | nope | init stuff NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah but don't | Only needed in createClass now use constructor for most things | |
    | render | render | nope | please no | render stuff and don't set any state please | |
    | componentDidMount | domReady() | yup | yup | DOM is a go init jQuery plugins dispatch stuff | |
    | componentWillReceiveProps | onChange() | yup | yup | Props changed feel free to update state if needed | |
    | componentWillUpdate | beforeRender() | yup | nope | The props or state changed need to do anything else before rendering? | |
    | shouldComponentUpdate | shouldRender() | yup | nope | So | yeah something changed but do we REALLY need to update? |
    | componentDidUpdate | afterRender() | yup | yup | Great success we've rendered a thing... anything else? | |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks aka unbind things | |
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? |
    |---------------------------|------------------|----------|------------------------|-----------------------------------------------------------------------|
    | constructor | initialize() | nope | nope | init stuff NO side effects |
    | componentWillMount | beforeDomReady() | nope | yeah but don't | Only needed in createClass now use constructor for most things |
    | render | render | nope | please no | render stuff and don't set any state please |
    | componentDidMount | domReady() | yup | yup | DOM is a go init jQuery plugins dispatch stuff |
    | componentWillReceiveProps | onChange() | yup | yup | Props changed feel free to update state if needed |
    | componentWillUpdate | beforeRender() | yup | nope | The props or state changed need to do anything else before rendering? |
    | shouldComponentUpdate | shouldRender() | yup | nope | So yeah something changed but do we REALLY need to update? |
    | componentDidUpdate | afterRender() | yup | yup | Great success we've rendered a thing... anything else? |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks aka unbind things |
  3. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------------------------------------------|----------------------------------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects |
    | constructor | initialize() | nope | nope | init stuff NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah but don't | Only needed in createClass now use constructor for most things | |
    | render | render | nope | please no | render stuff and don't set any state please | |
    | componentDidMount | domReady() | yup | yup | DOM is a go init jQuery plugins dispatch stuff | |
  4. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,9 @@
    | constructor | initialize() | nope | nope | init stuff | NO side effects |
    | componentWillMount | beforeDomReady() | nope | yeah but don't | Only needed in createClass now use constructor for most things | |
    | render | render | nope | please no | render stuff and don't set any state please | |
    | componentDidMount | domReady() | yup | yup | DOM is a go init jQuery plugins | dispatch stuff |
    | componentDidMount | domReady() | yup | yup | DOM is a go init jQuery plugins dispatch stuff | |
    | componentWillReceiveProps | onChange() | yup | yup | Props changed feel free to update state if needed | |
    | componentWillUpdate | beforeRender() | yup | nope | The props or state changed need to do anything else before rendering? | |
    | shouldComponentUpdate | shouldRender() | yup | nope | So | yeah something changed but do we REALLY need to update? |
    | componentDidUpdate | afterRender() | yup | yup | Great success we've rendered a thing... anything else? | |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks | aka unbind things |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks aka unbind things | |
  5. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------|---------------------------------------------|-----------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah | but don't | Only needed in createClass now | use constructor for most things |
    | render | render | nope | please no | render stuff | and don't set any state please | |
    | componentDidMount | domReady() | yup | yup | DOM is a go | init jQuery plugins | dispatch stuff |
    | componentWillReceiveProps | onChange() | yup | yup | Props changed | feel free to update state if needed | |
    | componentWillUpdate | beforeRender() | yup | nope | The props or state changed | need to do anything else before rendering? | |
    | shouldComponentUpdate | shouldRender() | yup | nope | So | yeah something changed | but do we REALLY need to update? |
    | componentDidUpdate | afterRender() | yup | yup | Great success | we've rendered a thing... anything else? | |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks | aka unbind things | |
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------------------------------------------|----------------------------------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects |
    | componentWillMount | beforeDomReady() | nope | yeah but don't | Only needed in createClass now use constructor for most things | |
    | render | render | nope | please no | render stuff and don't set any state please | |
    | componentDidMount | domReady() | yup | yup | DOM is a go init jQuery plugins | dispatch stuff |
    | componentWillReceiveProps | onChange() | yup | yup | Props changed feel free to update state if needed | |
    | componentWillUpdate | beforeRender() | yup | nope | The props or state changed need to do anything else before rendering? | |
    | shouldComponentUpdate | shouldRender() | yup | nope | So | yeah something changed but do we REALLY need to update? |
    | componentDidUpdate | afterRender() | yup | yup | Great success we've rendered a thing... anything else? | |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks | aka unbind things |
  6. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | |
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------|---------------------------------------------|-----------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah | but don't | Only needed in createClass now | use constructor for most things |
  7. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here?
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------|---------------------------------------------|-----------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah | but don't | Only needed in createClass now | use constructor for most things |
  8. jcreamer898 revised this gist Jun 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | | |
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here?
    |---------------------------|------------------|----------|------------------------|-----------------------------------|---------------------------------------------|-----------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah | but don't | Only needed in createClass now | use constructor for most things |
  9. jcreamer898 created this gist Jun 1, 2017.
    11 changes: 11 additions & 0 deletions react-lifecycle.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    | Name of thing | Sorta like... | Mounted? | Can you even setState? | What would you say... ya do here? | | |
    |---------------------------|------------------|----------|------------------------|-----------------------------------|---------------------------------------------|-----------------------------------|
    | constructor | initialize() | nope | nope | init stuff | NO side effects | |
    | componentWillMount | beforeDomReady() | nope | yeah | but don't | Only needed in createClass now | use constructor for most things |
    | render | render | nope | please no | render stuff | and don't set any state please | |
    | componentDidMount | domReady() | yup | yup | DOM is a go | init jQuery plugins | dispatch stuff |
    | componentWillReceiveProps | onChange() | yup | yup | Props changed | feel free to update state if needed | |
    | componentWillUpdate | beforeRender() | yup | nope | The props or state changed | need to do anything else before rendering? | |
    | shouldComponentUpdate | shouldRender() | yup | nope | So | yeah something changed | but do we REALLY need to update? |
    | componentDidUpdate | afterRender() | yup | yup | Great success | we've rendered a thing... anything else? | |
    | componentWillUnmount | destroy() | too late | too late | Only you can prevent memory leaks | aka unbind things | |