Skip to content

Turn into a controlled component #17

Open
@dacevedo12

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.

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