ple Choices
Kizspy.me
(Choose 1
answer)
ΠΑ
☐ B
ос
☐ D
What is the first step in migrating from useState to use Reducer with this code?
const [count, setCount] = useState(0);
function increment() {
}
setCount(count + 1);
A. Replace setCount with dispatch in the existing code.
B. Move all state update logic into a reducer function.
C. Define the reducer function and use dispatch to replace setCount.
D. Import useReducer without changing any code.
I want to in the exam.
LAPTOP RUNNING