Created with CodeSandbox
Simple exercise to prove how to lift the state to the closest common ancestor Component.
It relies on the top-down data flow instead of trying to sync the state between different components that we know it would only increment the surface area for bugs although it would imply less code.