javascript - React checkedLink how to access value on change -


i using react write simple component checkbox

<input type="checkbox" checkedlink={this.linkstate('checkedvalue')} /> 

i cannot figure out code gets triggered on change of checkbox value. supposed retrieve value onfocus or there better convention retrieving value after change.

you grab state of checkbox adding onchange handler this:

function handlechange (event) {   console.log(event.target.checked) }  <input onchange={handlechange} type='checkbox' /> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -