Quantcast
Viewing latest article 1
Browse Latest Browse All 4

Answer by Indranil for How to handle checkbox checked status in reactJS

Its very simple.Use event.target.checked to know the checkbox status.

Example:

HTML: <input type="checkbox" onClick={(e) => OnCheckboxClick(e)}/>JS:

const OnCheckboxClick= (e) => {    if(e.target.checked) {        //blah blah    }    else {       //blah blah    }}

Viewing latest article 1
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>