Closed HamzaAbugazia closed 1 year ago
Thanks @HamzaAbugazia , maybe this is due to React 18 useEffect and Strict Mode, so I wouldn't expect to affect any production env, but certainly can cause issues while development.
I think we can use this hack for now
I noticed that the useEffect that sets the
div
's inner HTML was running twice. This is fine for the content being rendered, since the innerHTML is cleared. but the script tags run twice, causing some issues in our use-case.This is a very simple hack to stop that from happening.