#Clear state of Checkbox group in custom component
3 messages · Page 1 of 1 (latest)
use value instead of defaultValue in your CheckList component
Thanks it worked. can you explain difference?
3 messages · Page 1 of 1 (latest)
I made a custom component to display checkbox list . I am passing the the state from parent component but for some reason the setChecked([]) is not updating checked state
https://codesandbox.io/s/quiet-water-pu3k4m?file=/src/App.tsx
use value instead of defaultValue in your CheckList component
Thanks it worked. can you explain difference?