clicking label doesn't click checkbox in React? clicking label doesn't click checkbox in React? reactjs reactjs

clicking label doesn't click checkbox in React?


Use htmlFor instead of for in react (see react supported attributes):

<input type="checkbox" id="check3"/> Fish<label htmlFor="check3"><span class="fa fa-check"/></label>


As it was already stated - use htmlFor and then try adding onClick event on label instead of on an input. This will add/remove checked attribute on the input itself. I assume that you already use defaultChecked attribute on your input.