How to set default Checked in checkbox ReactJS?

前端 未结 16 1998
难免孤独
难免孤独 2020-11-27 11:51

I\'m having trouble to update the checkbox state after it\'s assigned with default value checked="checked" in React.

var rCheck = React         


        
16条回答
  •  广开言路
    2020-11-27 12:30

    It`s working

    
    

    And function init it

    {this.viewCheckbox({ key: 'yourKey', text: 'yourText', checked: this.state.yourKey })}
    

提交回复
热议问题