xinthink / rnmk-demo

react-native-material-kit demo
80 stars 44 forks source link

Switch change doesn't animate when tied to props #22

Closed gkrinc closed 7 years ago

gkrinc commented 7 years ago

When I set the MKSwitch checked prop to a store value and set that store value when onCheckedChange fires, it's position toggles on and off, but the switch thumb doesn't animate.

<MKSwitch checked={this.props.fbShareEnabled}
                    onCheckedChange={() => this.props.fbShareSetEnabled(!this.props.fbShareEnabled)} />

What am I doing wrong? The example code for the MKSwitch provides no practical example of how to use this component :(

gkrinc commented 7 years ago

Meant to put this in the rnmk project https://github.com/xinthink/react-native-material-kit/issues/268