Skip to content

Turn into a controlled component #17

Description

@dacevedo12

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions