React Fundamentals Quiz
Question 1 of 5
Total Time Remaining
10:00
Preview Mode
This is a live preview of how the quiz will look once it starts. Customize the quiz using the settings on the left.
Which snippet correctly updates state in a React functional component using useState?
A
const [count, setCount] = useState(0);
setCount(count + 1);B
this.setState({ count: this.state.count + 1 });C
count = count + 1;D
const [count, setCount] = useState(0);
useState({ count: count + 1 });