TLDR: Use defaultChecked instead of checked, working jsbin.
Trying to setup a simple checkbox that will cross out its label text when it is checked. For some reason
It's better not to use refs in such cases. Use:
There are some options:
checked vs defaultCheckedThe former would respond to both state changes and clicks. The latter would ignore state changes.
onClick vs onChangeThe former would always trigger on clicks.
The latter would not trigger on clicks if checked attribute is present on input element.