79222292

Date: 2024-11-25 08:58:42
Score: 1
Natty:
Report link

setTimeout solved it

useEffect(() => {
    if (iframeRef.current) {
      iframeRef.current.onload = () => {
        setTimeout(() => {
          iframeRef.current.contentWindow.postMessage(
            { data  }
          ,process.env.IFRAME_LINK);
        }, 100);
      };
    }
  }, []);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Dana Allam