Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit a2ed0b4

Browse files
committed
Rename unsafe lifecycle methods
1 parent 1b7f6bb commit a2ed0b4

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

lib/BackgroundRippleAnimation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default class BackgroundRippleAnimation extends React.PureComponent {
1818
animation: new Animated.Value(0)
1919
}
2020

21-
componentWillMount() {
21+
UNSAFE_componentWillMount() {
2222
this.radius = this.calcRadius()
2323
}
2424

lib/BottomNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default class BottomNavigation extends React.Component {
9898
Dimensions.addEventListener('change', this.handleDimensionChange)
9999
}
100100

101-
componentWillReceiveProps(nextProps) {
101+
UNSAFE_componentWillReceiveProps(nextProps) {
102102
if (Platform.OS !== 'android') return
103103

104104
if (nextProps.viewportHeight !== this.props.viewportHeight) {

lib/FullTab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default class FullTab extends React.Component {
121121
}
122122
}
123123

124-
componentWillReceiveProps(nextProps) {
124+
UNSAFE_componentWillReceiveProps(nextProps) {
125125
if (!this.props.isActive && nextProps.isActive) {
126126
this.animateIn()
127127
}

lib/IconTab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default class IconTab extends React.Component {
8686
}
8787
}
8888

89-
componentWillReceiveProps(nextProps) {
89+
UNSAFE_componentWillReceiveProps(nextProps) {
9090
if (!this.props.isActive && nextProps.isActive) {
9191
this.animateIn()
9292
}

lib/PressRippleAnimation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class PressRippleAnimation extends React.PureComponent {
3232
this.runInAnimation()
3333
}
3434

35-
componentWillReceiveProps({ animateOut }) {
35+
UNSAFE_componentWillReceiveProps({ animateOut }) {
3636
if (animateOut && !this.props.animateOut) {
3737
this.runOutAnimation()
3838
}

lib/TabList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default class TabList extends React.PureComponent {
5757
}
5858
}
5959

60-
componentWillMount() {
60+
UNSAFE_componentWillMount() {
6161
// Initially set background color
6262
this.props.setBackgroundColor(this.getActiveTab().barColor)
6363

@@ -67,7 +67,7 @@ export default class TabList extends React.PureComponent {
6767
}
6868
}
6969

70-
componentWillReceiveProps({ activeTab: nextActiveTab }) {
70+
UNSAFE_componentWillReceiveProps({ activeTab: nextActiveTab }) {
7171
if (this.isControlled && nextActiveTab !== this.props.activeTab) {
7272
const { barColor } = this.getTab(nextActiveTab)
7373
this.setActiveTab(nextActiveTab)

0 commit comments

Comments
 (0)