react icon indicating copy to clipboard operation
react copied to clipboard

update checkbox defaultChecked , it doesn't work

Open majorye opened this issue 11 years ago • 5 comments

update checkbox defaultChecked , it doesn't work please see here

majorye avatar Aug 03 '15 03:08 majorye

It's not a bug. See the docs https://facebook.github.io/react/docs/forms.html#default-value

The defaultValue and defaultChecked props are only used during initial render.

nikolaymatrosov avatar Aug 03 '15 03:08 nikolaymatrosov

As mentioned, this is working as intended, you actually want a controlled component.

zpao avatar Aug 03 '15 03:08 zpao

thanks @nikolaymatrosov @zpao

majorye avatar Aug 03 '15 03:08 majorye

use checked property works, see here

majorye avatar Aug 03 '15 04:08 majorye

react is the most stupid thing i have ever seen

jaydeepresources avatar Nov 27 '17 16:11 jaydeepresources