Mind & EverydayHow it works
How a habit forms from three parts.
A habit is made of a cue, a routine and a reward. The cue is a place, a time, a feeling or a previous action. The routine is the behaviour. The reward tells your brain to store the loop. After enough repetitions the cue triggers the routine automatically, without you making a decision.
Useful: To change a habit, swap the routine and keep the cue and the reward.
Source: en.wikipedia.org