Skip to content

Commit 8e33001

Browse files
committed
docs: Add manual approach usage to README.md
1 parent 9cb38d1 commit 8e33001

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ scan({
4242
});
4343
```
4444

45+
Or, if you prefer a more manual approach, use the `withScan` API:
46+
47+
```js
48+
import { withScan } from 'react-scan';
49+
50+
const ExpensiveComponent = withScan(
51+
(props) => {
52+
// ...
53+
},
54+
{
55+
log: true,
56+
},
57+
);
58+
```
59+
4560
And voilà! You're ready to go.
4661

4762
## Why React Scan?

0 commit comments

Comments
 (0)