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 2760184 commit 8d42fc4Copy full SHA for 8d42fc4
packages/react-native/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm
@@ -60,7 +60,7 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
60
const auto &newSwitchProps = static_cast<const SwitchProps &>(*props);
61
62
// `value`
63
- if (oldSwitchProps.value != newSwitchProps.value) {
+ if (!_isInitialValueSet || oldSwitchProps.value != newSwitchProps.value) {
64
BOOL shouldAnimate = _isInitialValueSet == YES;
65
[_switchView setOn:newSwitchProps.value animated:shouldAnimate];
66
}
0 commit comments