When i change state to simple, and press the call to action button, the color still changes. Can anyone help?
So, based on state, you
addEventListener the appropriate function, right? But do you ever actually remove them (using
If you add a new listener, the old one is not removed. Listeners can stack, letting you add more as needed - but if you don’t want one, you must explicitly remove it.
Hi, i solved the solution, ironically, moments after i post this message, but you’re right I never knew
removeEventListener exist and i should have done that.
I just restructure my code and it’s all good thanks man
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.