Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactuseReducerSingle-choice MCQ

How does the lazy initializer argument to useReducer work, and what is passed to it?

function init(initialCount) { return { count: initialCount, history: [] }; } const [state, dispatch] = useReducer(reducer, 5, init);