By default, this component manages its own internal state. The checked prop is merely used as the initial state.
This becomes problematic if there's a need to remotely trigger a state change, mostly needed to compose complex forms.
For better understanding: <BootstrapSwitchButton checked={true} /> will display active but still toggle when the user clicks it.
By default, this component manages its own internal state. The checked prop is merely used as the initial state.
This becomes problematic if there's a need to remotely trigger a state change, mostly needed to compose complex forms.
For better understanding:
<BootstrapSwitchButton checked={true} />will display active but still toggle when the user clicks it.