We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecb4041 commit c4c79cfCopy full SHA for c4c79cf
src/fiber.ts
@@ -145,6 +145,13 @@ export const registerDevtoolsHook = ({
145
const REACT_MAJOR_VERSION = Number(React.version.split('.')[0]);
146
const dispatcherRefs = new Set();
147
148
+export const getFiberDEV = (): Fiber | null => {
149
+ return (
150
+ ReactSharedInternals?.A?.getOwner() ??
151
+ ReactSharedInternals?.ReactCurrentOwner?.current
152
+ );
153
+};
154
+
155
export const controlDispatcherRef = (currentDispatcherRef: any) => {
156
const ref = currentDispatcherRef;
157
if (ref && !dispatcherRefs.has(ref)) {
0 commit comments