Components can declare their own storage variables.When a contract uses a component, the component storage is merged with the contract storage.
The storage layout is only determined by the variables names, so variables with the same name will collide.
In a future release, the #[substorage(v1)] will determine the storage layout based on the component as well, so collisions will be avoided.
A good practice is to prefix the component storage variables with the component name, as shown in the Switchable component example.