You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Copyright 2024 Aiden Bai
1
+
Copyright 2024 Aiden Bai, Million Software, Inc.
2
2
3
3
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copy file name to clipboardExpand all lines: README.md
+50-6Lines changed: 50 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,18 @@
2
2
3
3
React Scan detects performance issues in your React app.
4
4
5
-
Previously, tools like [`<Profiler />`](https://react.dev/reference/react-devtools), [Why Did You Render?](https://github.com/welldone-software/why-did-you-render), and [React Devtools](https://legacy.reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html) required lots of manual code change, lacked simple visual cues, and had a high noise-to-signal ratio.
5
+
Previously, tools like [`<Profiler />`](https://react.dev/reference/react-devtools), [Why Did You Render?](https://github.com/welldone-software/why-did-you-render), and [React Devtools](https://legacy.reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html) required lots of manual code change, lacked simple visual cues, and had noisy data.
6
6
7
-
Instead, React Scan automatically detects and highlights components that cause performance issues. This filters out the noise and shows you exactly what you need to fix.
7
+
Instead, React Scan automatically detects and highlights renders that cause performance issues. This shows you exactly which components you need to fix.
8
8
9
9
It's also just JavaScript, so you drop it in anywhere – script tag, npm, you name it!
10
10
11
-
[**Try it out! →**](https://react-scan.million.dev)
11
+
### [**Try it out! →**](https://react-scan.million.dev)
12
12
13
13

14
14
15
+
> Looking for a more advanced version? Check out [Million Lint](https://million.dev)!
16
+
15
17
## Install
16
18
17
19
Get started in 5 seconds, add this script to your app:
@@ -40,12 +42,42 @@ scan({
40
42
41
43
And voilà! You're ready to go.
42
44
43
-
> Looking for a more advanced version? Check out [Million Lint](https://million.dev)!
45
+
## Why React Scan?
46
+
47
+
React can be tricky to optimize.
48
+
49
+
The issue is that component props are compared by reference, not value. This is intentional – this way rendering can be cheap to run.
50
+
51
+
However, this makes it easy to accidentally cause unnecessary renders, making the the app slow. Even in production apps, with hundreds of engineers, can't fully optimize their apps (see [GitHub](https://github.com/aidenybai/react-scan/blob/main/.github/assets/github.mp4), [Twitter](https://github.com/aidenybai/react-scan/blob/main/.github/assets/twitter.mp4), and [Instagram](https://github.com/aidenybai/react-scan/blob/main/.github/assets/instagram.mp4)).
52
+
53
+
This often comes down to props that update in reference, like callbacks or object values. For example, the `onClick` function and `style` object are re-created on every render, causing `ExpensiveComponent` to slow down the app:
React Scan helps you identify these issues by automatically detecting and highlighting renders that cause performance issues. Now, instead of guessing, you can see exactly which components you need to fix.
60
+
61
+
> Want to automatically fix these issues? Check out [Million Lint](https://million.dev)!
44
62
45
-
## How does it work?
63
+
## Resources & Contributing Back
46
64
47
-
## Future roadmap
65
+
Want to try it out? Check the [our demo](https://react-scan.million.dev).
48
66
67
+
Looking to contribute back? Check the [Contributing Guide](https://github.com/aidenybai/react-scan/blob/main/.github/CONTRIBUTING.md) out.
68
+
69
+
Want to talk to the community? Hop in our [Discord](https://discord.gg/X9yFbcV2rF) and share your ideas and what you've build with React Scan.
70
+
71
+
Find a bug? Head over to our [issue tracker](https://github.com/aidenybai/react-scan/issues) and we'll do our best to help. We love pull requests, too!
72
+
73
+
We expect all contributors to abide by the terms of our [Code of Conduct](https://github.com/aidenybai/react-scan/blob/main/.github/CODE_OF_CONDUCT.md).
74
+
75
+
[**→ Start contributing on GitHub**](https://github.com/aidenybai/react-scan/blob/main/.github/CONTRIBUTING.md)
76
+
77
+
-[x] Scan only for unnecessary renders ("unstable" props)
78
+
-[x] Scan API (`withScan`, `scan`)
79
+
-[ ] Offscreen canvas on worker thread
80
+
-[ ] React Native support
49
81
-[ ] Chrome extension
50
82
-[ ] Cleanup config options
51
83
-[ ] Name / explain the actual problem
@@ -54,3 +86,15 @@ And voilà! You're ready to go.
54
86
-[ ] Drag and select areas of the screen to scan
55
87
-[ ] Mode to only show on main thread blocking
56
88
-[ ] Add a funny mascot, like the ["Stop I'm Changing" dude](https://www.youtube.com/shorts/FwOZdX7bDKI?app=desktop)
89
+
90
+
## Acknowledgments
91
+
92
+
React Scan takes inspiration from the following projects:
93
+
94
+
-[Million Lint](https://million.dev) for scanning and linting approaches
95
+
-[React Devtools](https://react.dev/learn/react-developer-tools) for the initial idea of [highlighting renders](https://medium.com/dev-proto/highlight-react-components-updates-1b2832f2ce48)
96
+
-[Why Did You Render?](https://github.com/welldone-software/why-did-you-render) for the concept of hijacking internals to detect unnecessary renders caused by "unstable" props
97
+
98
+
## License
99
+
100
+
React Scan is [MIT-licensed](LICENSE) open-source software by Aiden Bai, [Million Software, Inc.](https://million.dev), and [contributors](https://github.com/aidenybai/react-scan/graphs/contributors):
0 commit comments