Skip to content

Commit

Permalink
docs: Update installation instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed Dec 16, 2024
1 parent e4cd3ee commit 5641363
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,7 @@ Airbnb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://polaris.shopify.com/"
## Install

> Looking for [React Native](https://github.com/aidenybai/react-scan/pull/23)?
The fastest way to get started is via CLI. This will spin up an isolated browser instance which you can interact or use React Scan with.

```bash
npx react-scan@latest http://localhost:3000
# you can technically scan ANY website on the web:
# npx react-scan@latest https://react.dev
```

You can add it to your existing dev process as well. Here's an example for Next.js:

```json
{
"scripts": {
"dev": "next dev",
"scan": "next dev & npx react-scan@latest localhost:3000"
}
}
```

If you don't want to use a separate browser and you have access to your local codebase, then add this script to your app:
Add this script to your app:

```html
<!-- import this BEFORE any scripts -->
Expand Down Expand Up @@ -160,6 +139,27 @@ if (typeof window !== 'undefined') {
}
```

> Looking for [React Native](https://github.com/aidenybai/react-scan/pull/23)?
If you don't have a localv version of the site, you can use the CLI. This will spin up an isolated browser instance which you can interact or use React Scan with.

```bash
npx react-scan@latest http://localhost:3000
# you can technically scan ANY website on the web:
# npx react-scan@latest https://react.dev
```

You can add it to your existing dev process as well. Here's an example for Next.js:

```json
{
"scripts": {
"dev": "next dev",
"scan": "next dev & npx react-scan@latest localhost:3000"
}
}
```

## API Reference

<details>
Expand Down

0 comments on commit 5641363

Please sign in to comment.