react-web-component icon indicating copy to clipboard operation
react-web-component copied to clipboard

bug: the appInstance variable is shared by all the instances of the web component

Open humanchimp opened this issue 1 year ago • 0 comments

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!

humanchimp avatar Jul 13 '23 00:07 humanchimp