Based on original work by Spencer, this example shows how you can have multiple independent pieces of state that respond to different interactions: