react-scan icon indicating copy to clipboard operation
react-scan copied to clipboard

Cannot get it to work with React Portals that render to child windows

Open stil opened this issue 10 months ago • 3 comments

I have React Portals that render into separate windows, however react-scan is not detecting changes except for parent window.

See attached example: https://codesandbox.io/p/sandbox/6tjkd4

Can you advise if it would be possible to make react-scan work in child windows?

stil avatar Mar 12 '25 17:03 stil

Well technically it is a separate window so that other window should also include its own react-scan instance.

Currently react-scan only "scans" the window it is mounted on.

lxsmnsyc avatar Mar 13 '25 02:03 lxsmnsyc

Would you be able to provide an example on forked codesandbox?

I'm unsure how would that work if the child window has no

stil avatar Mar 13 '25 02:03 stil

yeah the difficulty of mounting it might be an issue. I'll keep this issue open while I look for solution myself.

lxsmnsyc avatar Mar 13 '25 03:03 lxsmnsyc