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
Prev Previous commit
Next Next commit
Added warning for UNSAFE_componentWillRecieveProps misspelling
  • Loading branch information
bvaughn committed Jan 17, 2018
commit f0ac6efbcd0cfb29e99356270a41ea1e4d785012
6 changes: 6 additions & 0 deletions addons/create-react-class/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,12 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
'Did you mean UNSAFE_componentWillReceiveProps()?',
spec.displayName || 'A component'
);
}

// Reduce time spent doing lookups by setting these on the prototype.
Expand Down