Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Switch component not animating when value changes programmatically

$
0
0

When I update the value of the Switch component via state, the toggle transition doesnt work. It goes instantly from on to off and vice versa. However, when I directly click on the switch, it animates just fine.

Is there any way to animate the transition when I switch the value via state? This is what my switch looks like:

<Switch value={this.props.switchIsEnabled}></Switch>

Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>