Description

A notification badge shows the number of unread messages and a button to dismiss them one at a time. The component goes blank the moment the page loads - nothing renders at all.

Anomaly

The component area is blank on load. No count, no button, no output of any kind.

Constraint
Do not add useEffect to the fix
Do not add any new state variables
Hint
Consult the SenseiOnly for those truly stuck · Flip to reveal

Look at every line in the component body and consider whether all of them belong there.

Loading editor…
Correct Solution
Loading...

Why this fixes it

setCount(INBOX_COUNT) ran in the component body on every render. Each call scheduled a state update, which triggered a new render, which called setCount again - a loop with no exit. React detects this and throws "Too many re-renders" before committing anything to the DOM. useState already accepts the initial value as its argument, so passing INBOX_COUNT directly and removing the standalone setCount line sets the starting value once at initialization with no setter involved.

Expected OutputGoal State
Your OutputLive