Using act, while not always necessary is good practice when updating state or testing rendered components, since it "makes your test run closer to how React works in the browser" (docs) by making sure that rendering happens before any assertions.
act