Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added UNSAFE_ methods to create-class HAS_MANY list
  • Loading branch information
bvaughn committed Jan 17, 2018
commit 611b7fda8d38038e29febea65eac9f49cd6ea93a
21 changes: 21 additions & 0 deletions addons/create-react-class/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,20 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
*/
componentWillReceiveProps: 'DEFINE_MANY',

/**
* Replacement for (deprecated) `componentWillMount`.
*
* @optional
*/
UNSAFE_componentWillMount: 'DEFINE_MANY',

/**
* Replacement for (deprecated) `componentWillReceiveProps`.
*
* @optional
*/
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',

/**
* Invoked while deciding if the component should be updated as a result of
* receiving new props, state and/or context.
Expand Down Expand Up @@ -243,6 +257,13 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
*/
componentWillUpdate: 'DEFINE_MANY',

/**
* Replacement for (deprecated) `shouldComponentUpdate`.
*
* @optional
*/
UNSAFE_shouldComponentUpdate: 'DEFINE_MANY',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is new to me. Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Sorry! Looks like I fucked up there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha no worries. Fresh eyes always help 👀


/**
* Invoked when the component's DOM representation has been updated.
*
Expand Down