Changing the state in the pseudo element insertation