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

[Feature]: Allow user to disable react scan through script tag attribute

Open RobPruzan opened this issue 11 months ago • 3 comments

Ideally we should allow:

RobPruzan avatar Mar 05 '25 19:03 RobPruzan

I was actually thinking maybe we can do something like

<script>
  window.__REACT_SCAN_CONFIG = {
    enabled: true,
  };
</script>
<script src="/path/to/auto"></script>

so users can still have full access to the options.

lxsmnsyc avatar Mar 06 '25 03:03 lxsmnsyc

I was actually thinking maybe we can do something like

so users can still have full access to the options.

Much better idea. It may actually already work since we use signals

<script src="/path/to/auto"></script>
<script>
  window.ReactScanInternals.options.value.enabled = false
</script>


RobPruzan avatar Mar 06 '25 03:03 RobPruzan

Bucks ?

pratyax1997 avatar Mar 09 '25 10:03 pratyax1997