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 6460335 commit f2a56c1Copy full SHA for f2a56c1
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