Custom Module composable state not reset after hot reload
I wanted to learn how to do nuxt modules so I made this: https://github.com/Waradu/keyboard the problem is in
Example
if I now change "pressed" to "pressed2" while running dev mode and the application hot reloads, it prints "pressed" and "pressed2".
Printing "handlers" from
Why is that and how to fix?
src/runtime/keyboard.ts > handlers. If the application hot reloades the "new" event get added but the old one are still in the list. Example
testapp:if I now change "pressed" to "pressed2" while running dev mode and the application hot reloads, it prints "pressed" and "pressed2".
Printing "handlers" from
keyboard.ts shows that there are 2 KeyHandlers instead of 1.Why is that and how to fix?
GitHub
Contribute to Waradu/keyboard development by creating an account on GitHub.