We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf16169 commit 4aae8e9Copy full SHA for 4aae8e9
examples/react-testing-library/CheckboxWithLabel.js
@@ -6,7 +6,7 @@ export default function CheckboxWithLabel({labelOn, labelOff}) {
6
const [isChecked, setIsChecked] = useState(false);
7
8
const onChange = () => {
9
- setIsChecked(!isChecked);
+ setIsChecked(draft => !draft);
10
};
11
12
return (
0 commit comments