When do I need to use act() when tests cause react state updates
I’m using vitest and @testing-libarary/react. Both tests pass, but the 2nd one shows a warning to use act(). Clicking on the foo and bar buttons causes a react state update, but it seems only when triggering setBaz inside the timeout does it complain.