dillon1000/react

Commit

Don't use closures in DevTools injection (#18278)

* Don't use closures in DevTools injection

Nested closures are tricky. They're not super efficient and when they share
scope between multiple closures they're hard for a compiler to optimize.
It's also unclear how many versions will be created.

By hoisting things out an just make it simple calls the compiler can do
a much better job.

* Store injected hook to work around fast refresh
Browse files
Changed paths2 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberDevToolsHook.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.old.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…