We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 150485c commit 6bd5601Copy full SHA for 6bd5601
src/js/RNCSliderNativeComponent.web.js
@@ -184,10 +184,9 @@ const RCTSliderWebComponent = React.forwardRef(
184
const containerRef = forwardedRef || React.createRef();
185
const hasBeenResized = React.useRef(false);
186
const [value, setValue] = React.useState(initialValue || minimumValue);
187
- React.useLayoutEffect(() => updateValue(initialValue), [
188
- initialValue,
189
- updateValue,
190
- ]);
+ React.useLayoutEffect(() => {
+ updateValue(initialValue);
+ }, [initialValue, updateValue]);
191
192
const percentageValue =
193
(value - minimumValue) / (maximumValue - minimumValue);
0 commit comments