feat(ui): add react-scan script for react component performance testing #1398
+9
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
react-scan
debugging tool. It's really useful for React component refresh performance testing.This script should always be commented out, and only enabled locally when specifically doing performance improvement work. I added an environment check to the script as an extra precaution in case it's ever accidentally bundled to production.
To activate it, just un-comment the script tag.
Here's a video of
react-scan
in action.https://www.loom.com/share/3fc3d6485ab34a7cbee6f9bbf6383b93?sid=b83c9b67-bab9-437e-8d69-105eafb65a82
While mining....
https://www.loom.com/share/a389f6320f5e4613b72d15fd1ace78e0?sid=ab2c709f-09fd-4024-b53b-2b454a681523