Skip to content

Commit

Permalink
Rename unsafe lifecycle methods
Browse files Browse the repository at this point in the history
  • Loading branch information
timomeh committed Dec 10, 2019
1 parent 1b7f6bb commit a2ed0b4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/BackgroundRippleAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class BackgroundRippleAnimation extends React.PureComponent {
animation: new Animated.Value(0)
}

componentWillMount() {
UNSAFE_componentWillMount() {
this.radius = this.calcRadius()
}

Expand Down
2 changes: 1 addition & 1 deletion lib/BottomNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class BottomNavigation extends React.Component {
Dimensions.addEventListener('change', this.handleDimensionChange)
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (Platform.OS !== 'android') return

if (nextProps.viewportHeight !== this.props.viewportHeight) {
Expand Down
2 changes: 1 addition & 1 deletion lib/FullTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class FullTab extends React.Component {
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (!this.props.isActive && nextProps.isActive) {
this.animateIn()
}
Expand Down
2 changes: 1 addition & 1 deletion lib/IconTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class IconTab extends React.Component {
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (!this.props.isActive && nextProps.isActive) {
this.animateIn()
}
Expand Down
2 changes: 1 addition & 1 deletion lib/PressRippleAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class PressRippleAnimation extends React.PureComponent {
this.runInAnimation()
}

componentWillReceiveProps({ animateOut }) {
UNSAFE_componentWillReceiveProps({ animateOut }) {
if (animateOut && !this.props.animateOut) {
this.runOutAnimation()
}
Expand Down
4 changes: 2 additions & 2 deletions lib/TabList.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class TabList extends React.PureComponent {
}
}

componentWillMount() {
UNSAFE_componentWillMount() {
// Initially set background color
this.props.setBackgroundColor(this.getActiveTab().barColor)

Expand All @@ -67,7 +67,7 @@ export default class TabList extends React.PureComponent {
}
}

componentWillReceiveProps({ activeTab: nextActiveTab }) {
UNSAFE_componentWillReceiveProps({ activeTab: nextActiveTab }) {
if (this.isControlled && nextActiveTab !== this.props.activeTab) {
const { barColor } = this.getTab(nextActiveTab)
this.setActiveTab(nextActiveTab)
Expand Down

0 comments on commit a2ed0b4

Please sign in to comment.