react-web-component
react-web-component copied to clipboard
bug: the appInstance variable is shared by all the instances of the web component
Hello. The appInstance
variable is shared by all the instances of the web component in a manner that is subject to race conditions. i recommend storing it as an instance property on the class instead. This bug exhibits when multiple instances will contend for that variable, and then they'll end up dispatching, say webComponentAttributeChanged
, to the wrong instance. I hope someone finds this insight helpful! Sorry I didn't have time to make a PR. Thanks!