The easiest way to add React Scan to any project is by including it as a script tag in your HTML.
Installation
Add the script tag
Paste this script tag before any other scripts in your HTML file:<script
crossOrigin="anonymous"
src="//unpkg.com/react-scan/dist/auto.global.js"
></script>
Verify it works
Open your app in the browser. You should see the React Scan toolbar appear on the page.
Available CDN URLs
You can use either of these CDN providers:
UNPKG
https://unpkg.com/react-scan/dist/auto.global.js
JSDelivr
https://cdn.jsdelivr.net/npm/react-scan/dist/auto.global.js
Example
<!doctype html>
<html lang="en">
<head>
<script
crossOrigin="anonymous"
src="//unpkg.com/react-scan/dist/auto.global.js"
></script>
<!-- rest of your scripts go under -->
</head>
<body>
<div id="root"></div>
</body>
</html>
React Scan only runs in development by default. It will not affect your production builds.