question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HMR and event handlers

See original GitHub issue

Hey ! …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:closed
  • Created 6 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
cedric-marconecommented, May 29, 2017

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.

1reaction
cedric-marconecommented, May 26, 2017

Thanks for the merge !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found