https://medium.com/@albertogasparin/forcing-state-reset-on-a-react-component-by-using-the-key-prop-14b36cd7448e
it helps React identifying a component but it also can be used to tell React that the component identity has changed, forcing a full re-instantiation of that component
On change, React will discard the current component instance and create a new one with a fresh state.