5 hands-on exercises and 5 find-the-bug challenges for the Showing, Hiding and Losing State lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Render the box when shown is true, and report it below.
Keep the element mounted but hidden with a style.
Mount the panel when the button is pressed.
Render one view or the other, never both.
Show the empty note only for an empty list.
The condition reads the wrong flag, so the box is always left out.
The style should follow the flag.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspaceBoth views render because each has its own condition.
The note shows even when the list has items.
The handler sets the flag to false instead of true.