You keep them attached to the Switch, and while the switch is on the dock it charges the joy cons. I also heard that even while you are playing in portable mode, that the joy cons draw power from the switch to maintain a charge, but can't guarantee that part.