dillon1000/react

Commit

refactor[react-devtools-shared]: minor parsing improvements and modifications (#27661)

Had these stashed for some time, it includes:
- Some refactoring to remove unnecessary `FlowFixMe`s and type castings
via `any`.
- Optimized version of parsing component names. We encode string names
to utf8 and then pass it serialized from backend to frontend in a single
array of numbers. Previously we would call `slice` to get the
corresponding encoded string as a subarray and then parse each
character. New implementation skips `slice` step and just receives
`left` and `right` ranges for the string to parse.
- Early `break` instead of `continue` when Store receives unexpected
operation, like removing an element from the Store, which is not
registered yet.
Browse files
Changed paths6 files
First-parent comparison
M packages/react-devtools-shared/src/backend/renderer.js ModifiedM packages/react-devtools-shared/src/devtools/store.js ModifiedM packages/react-devtools-shared/src/devtools/views/Components/Element.js ModifiedM packages/react-devtools-shared/src/devtools/views/Components/HocBadges.js ModifiedM packages/react-devtools-shared/src/devtools/views/Profiler/CommitTreeBuilder.js ModifiedM packages/react-devtools-shared/src/utils.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…