mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Flatten ReactSharedInternals (#28783)
This is similar to #28771 but for isomorphic. We need a make over for these dispatchers anyway so this is the first step. Also helps flush out some internals usage that will break anyway. It flattens the inner mutable objects onto the ReactSharedInternals.
This commit is contained in:
committed by
GitHub
parent
acef2f8111
commit
d50323eb84
@@ -86,8 +86,8 @@ export function describeNativeComponentFrame(
|
||||
// Note that unlike the code this was forked from (in ReactComponentStackFrame)
|
||||
// DevTools should override the dispatcher even when DevTools is compiled in production mode,
|
||||
// because the app itself may be in development mode and log errors/warnings.
|
||||
const previousDispatcher = currentDispatcherRef.current;
|
||||
currentDispatcherRef.current = null;
|
||||
const previousDispatcher = currentDispatcherRef.H;
|
||||
currentDispatcherRef.H = null;
|
||||
disableLogs();
|
||||
|
||||
// NOTE: keep in sync with the implementation in ReactComponentStackFrame
|
||||
@@ -270,7 +270,7 @@ export function describeNativeComponentFrame(
|
||||
|
||||
Error.prepareStackTrace = previousPrepareStackTrace;
|
||||
|
||||
currentDispatcherRef.current = previousDispatcher;
|
||||
currentDispatcherRef.H = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
// Fallback to just using the name if we couldn't make it throw.
|
||||
|
||||
Reference in New Issue
Block a user