another way of handling this is to specify a key for the co…
another way of handling this is to specify a key for the component which will cause it to re-instantiate with the new props and to re-instantiate the state from those in case the key changes