Skip to content

Commit

Permalink
Prefix unsafe lifecycle methods with “UNSAFE_”.
Browse files Browse the repository at this point in the history
The React Native code this was vendored from also prefixes with “UNSAFE_”.
  • Loading branch information
calebmer committed May 2, 2019
1 parent 71fef31 commit bfb1b89
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -129,7 +129,7 @@ const TouchableHighlight = createReactClass({
ensureComponentIsNative(this._childRef);
},

componentWillReceiveProps: function(nextProps) {
UNSAFE_componentWillReceiveProps: function(nextProps) {
ensurePositiveDelayProps(nextProps);
if (
nextProps.activeOpacity !== this.props.activeOpacity ||
Expand Down
Expand Up @@ -77,7 +77,7 @@ const TouchableOpacity = createReactClass({
ensurePositiveDelayProps(this.props);
},

componentWillReceiveProps: function(nextProps) {
UNSAFE_componentWillReceiveProps: function(nextProps) {
ensurePositiveDelayProps(nextProps);
},

Expand Down
Expand Up @@ -99,7 +99,7 @@ const TouchableWithoutFeedback = createReactClass({
ensurePositiveDelayProps(this.props);
},

componentWillReceiveProps: function(nextProps: Object) {
UNSAFE_componentWillReceiveProps: function(nextProps: Object) {
ensurePositiveDelayProps(nextProps);
},

Expand Down
Expand Up @@ -491,7 +491,7 @@ const ScrollResponderMixin = {
*
* The `keyboardWillShow` is called before input focus.
*/
componentWillMount: function() {
UNSAFE_componentWillMount: function() {
this.keyboardWillOpenTo = null;
this.additionalScrollOffset = 0;
// this.addListenerOn(RCTDeviceEventEmitter, 'keyboardWillShow', this.scrollResponderKeyboardWillShow);
Expand Down

0 comments on commit bfb1b89

Please sign in to comment.