Closed andresmrm closed 9 years ago
@andresmrm thank you so much for the information! I will look into it and fix the code.
@andresmrm I have fixed the bug like your suggestion. Thanks again for letting me know this trick!
I'm glad it was helpful, and thanks you for the code example. =)
Hello, @txchen ! And thanks for the great code example!
I'm using your
riot_webpack
as a base to one project. It is a great help!But today I saw that everytime I do in a tag:
I need to also do:
If not, when the tag is mounted again, the old callback will still be there, so
func
will be run 2X. Here, after some remounts the callback would be running +30X. I tested your code now, and it seems to have the same problem.Am I misunderstanding something?
Here the problem was fixed by adding this to a base mixing (used by all tags):
And calling it instead of
riot.control.on
.