HMR and event handlers
See original GitHub issueHey ! …me again 😃
In https://github.com/developit/preact-cli HMR is active and it doesn’t play well with the event handlers you’re binding.
I think the reason is you’re attaching them in componentDidMount
but they are never cleared in componentWillUnmount
.
Do you accept PRs ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Javascript Events Doubled by HMR - sage - Roots Discourse
I'm finding that all of my Javascript events are being compounded by HMR when it performs a reload. For example, with this script:...
Read more >Hot Module Replacement - webpack
Hot Module Replacement (or HMR) is one of the most useful features offered ... This is happening because the button's onclick event handler...
Read more >EVENT PRODUCER | HMR Designs
The Event Producer provides clerical, online and on-site support for the Event Sales staff for a variety of aspects for HMR Designs' business....
Read more >HMR API - Vite
This is the client HMR API. For handling HMR update in plugins, see handleHotUpdate. The manual HMR API is primarily intended for framework...
Read more >Event handling (overview) - Event reference - MDN Web Docs
To set event handler code you can just assign it to the appropriate onevent property. Only one event handler can be assigned for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I updated the test project (https://github.com/cedric-marcone/preact-material-components-test) to reflect changes in #129 and #128. => It works perfectly, thanks for your commitment.
Thanks for the merge !