is there a sample for how to make a switch work? i...
# fritz2
n
is there a sample for how to make a switch work? i seem to be unable to figure out how to set its state when clicked which function do i call to make sure that it takes its display state from a subStore / lense thing ? figured it out.. there was a exampple for checkBox that does this
Copy code
switch {
    checked { switchState.data }
    changes handledBy switchHandlerStore.flip
}
j
We improved the api of the components a lot with version 0.9 (released today). Please have a look at: https://components.fritz2.dev/#Switch for a working example.