GeezerVison is showing github.com — Add useSyncExternalStore and useTransition to getPrimitiveStackCache … · hanzoai/react@6f64252
File treeExpand file treeCollapse file tree Open diff view settings packages/react-debug-tools/src
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-debug-tools/src/ReactDebugHooks.js +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -82,6 +82,13 @@ function getPrimitiveStackCache(): Map<string, Array<any>> { | 82 | 82 | Dispatcher.useImperativeHandle(undefined, () => null); | 83 | 83 | Dispatcher.useDebugValue(null); | 84 | 84 | Dispatcher.useCallback(() => {}); | | 85 | + Dispatcher.useTransition(); | | 86 | + Dispatcher.useSyncExternalStore( | | 87 | + () => () => {}, | | 88 | + () => null, | | 89 | + () => null, | | 90 | + ); | | 91 | + Dispatcher.useDeferredValue(null); | 85 | 92 | Dispatcher.useMemo(() => null); | 86 | 93 | if (typeof Dispatcher.useMemoCache === 'function') { | 87 | 94 | // This type check is for Flow only. | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -928,7 +928,7 @@ describe('ReactHooksInspectionIntegration', () => { | 928 | 928 | "hookSource": { | 929 | 929 | "columnNumber": 0, | 930 | 930 | "fileName": "**", | 931 | | - "functionName": null, | | 931 | + "functionName": "Foo", | 932 | 932 | "lineNumber": 0, | 933 | 933 | }, | 934 | 934 | "id": 0, | @@ -986,7 +986,7 @@ describe('ReactHooksInspectionIntegration', () => { | 986 | 986 | "hookSource": { | 987 | 987 | "columnNumber": 0, | 988 | 988 | "fileName": "**", | 989 | | - "functionName": null, | | 989 | + "functionName": "Foo", | 990 | 990 | "lineNumber": 0, | 991 | 991 | }, | 992 | 992 | "id": 0, | @@ -1969,7 +1969,7 @@ describe('ReactHooksInspectionIntegration', () => { | 1969 | 1969 | "hookSource": { | 1970 | 1970 | "columnNumber": 0, | 1971 | 1971 | "fileName": "**", | 1972 | | - "functionName": null, | | 1972 | + "functionName": "Foo", | 1973 | 1973 | "lineNumber": 0, | 1974 | 1974 | }, | 1975 | 1975 | "id": 0, | |
|