Skip to content

Commit 505efcc

Browse files
authored
moving componentWillMount code to c'tor (#887)
1 parent ec8713d commit 505efcc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/slider/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export default class Slider extends PureBaseComponent {
121121
this.initialThumbSize = THUMB_SIZE;
122122

123123
this.checkProps(props);
124+
125+
this.createPanResponderConfig();
124126
}
125127

126128
checkProps(props) {
@@ -132,7 +134,7 @@ export default class Slider extends PureBaseComponent {
132134
}
133135
}
134136

135-
UNSAFE_componentWillMount() {
137+
createPanResponderConfig() {
136138
this._panResponder = PanResponder.create({
137139
onMoveShouldSetPanResponder: this.handleMoveShouldSetPanResponder,
138140
onPanResponderGrant: this.handlePanResponderGrant,

0 commit comments

Comments
 (0)