Right now I'm able to set a checked={checked} prop except that I get this warning.
react_devtools_backend.js:6 Warning: A component is changing an uncontrolled input of type checkbox to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components
Wouldnt the checked prop be checked by default if set to true initially? where as the defaultChecked wont retain its value after i change it later, as in a toggle event.
Right now I'm able to set a
checked={checked}
prop except that I get this warning.Wouldnt the
checked
prop be checked by default if set to true initially? where as thedefaultChecked
wont retain its value after i change it later, as in a toggle event.