Today, I discuss the problem of state not being reset when rendering the same component in the same position within the React tree.
Read more about this here: https://react.dev/learn/preserving-and-resetting-state#resetting-state-at-the-same-position