Skip to content

Commit 8a0e2ab

Browse files
author
Brian Vaughn
committed
Promote concurrent mode APIs from experimental to stable
1 parent ea9b1ad commit 8a0e2ab

File tree

26 files changed

+50
-118
lines changed

26 files changed

+50
-118
lines changed

packages/react-devtools-scheduling-profiler/src/hooks.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
* @flow
88
*/
99

10-
import {
11-
unstable_createMutableSource as createMutableSource,
12-
unstable_useMutableSource as useMutableSource,
13-
useLayoutEffect,
14-
} from 'react';
10+
import {createMutableSource, useMutableSource, useLayoutEffect} from 'react';
1511

1612
import {
1713
updateDisplayDensity,

packages/react-devtools-shared/src/devtools/views/Components/InspectedElementContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import * as React from 'react';
1111
import {
1212
createContext,
13-
unstable_startTransition as startTransition,
13+
startTransition,
1414
unstable_useCacheRefresh as useCacheRefresh,
1515
useCallback,
1616
useContext,

packages/react-devtools-shared/src/devtools/views/Components/InspectedElementErrorsAndWarningsTree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as React from 'react';
1111
import {
1212
useContext,
1313
unstable_useCacheRefresh as useCacheRefresh,
14-
unstable_useTransition as useTransition,
14+
useTransition,
1515
} from 'react';
1616
import Button from '../Button';
1717
import ButtonIcon from '../ButtonIcon';

packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
*/
99

1010
import * as React from 'react';
11-
import {
12-
unstable_useTransition as useTransition,
13-
useContext,
14-
useRef,
15-
useState,
16-
} from 'react';
11+
import {useTransition, useContext, useRef, useState} from 'react';
1712
import EditableName from './EditableName';
1813
import EditableValue from './EditableValue';
1914
import NewArrayValue from './NewArrayValue';

packages/react-devtools-shared/src/devtools/views/Components/TreeContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
useMemo,
3535
useReducer,
3636
useRef,
37-
unstable_startTransition as startTransition,
37+
startTransition,
3838
} from 'react';
3939
import {createRegExp} from '../utils';
4040
import {BridgeContext, StoreContext} from '../context';

packages/react-devtools-shared/src/devtools/views/ErrorBoundary/cache.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import type {Wakeable} from 'shared/ReactTypes';
1111
import type {GitHubIssue} from './githubAPI';
1212

13-
import {unstable_getCacheForType} from 'react';
13+
import {unstable_getCacheForType as getCacheForType} from 'react';
1414
import {searchGitHubIssues} from './githubAPI';
1515

1616
const API_TIMEOUT = 3000;
@@ -55,7 +55,7 @@ function createMap(): GitHubIssueMap {
5555
}
5656

5757
function getRecordMap(): Map<string, Record<GitHubIssue>> {
58-
return unstable_getCacheForType(createMap);
58+
return getCacheForType(createMap);
5959
}
6060

6161
export function findGitHubIssue(errorMessage: string): GitHubIssue | null {

packages/react-devtools-shared/src/inspectedElementCache.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
import {
11-
unstable_getCacheForType,
12-
unstable_startTransition as startTransition,
11+
unstable_getCacheForType as getCacheForType,
12+
startTransition,
1313
} from 'react';
1414
import Store from './devtools/store';
1515
import {inspectElement as inspectElementMutableSource} from './inspectedElementMutableSource';
@@ -60,7 +60,7 @@ function createMap(): InspectedElementMap {
6060
}
6161

6262
function getRecordMap(): WeakMap<Element, Record<InspectedElementFrontend>> {
63-
return unstable_getCacheForType(createMap);
63+
return getCacheForType(createMap);
6464
}
6565

6666
function createCacheSeed(

packages/react-devtools-shell/src/app/SuspenseTree/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
*/
99

1010
import * as React from 'react';
11-
import {
12-
Fragment,
13-
Suspense,
14-
unstable_SuspenseList as SuspenseList,
15-
useState,
16-
} from 'react';
11+
import {Fragment, Suspense, SuspenseList, useState} from 'react';
1712

1813
function SuspenseTree() {
1914
return (

packages/react-dom/index.classic.fb.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ export {
2222
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
2323
createPortal,
2424
createRoot,
25-
createRoot as unstable_createRoot,
25+
createRoot as unstable_createRoot, // TODO Remove once callsites use createRoot
2626
findDOMNode,
2727
flushSync,
2828
hydrate,
2929
render,
3030
unmountComponentAtNode,
3131
unstable_batchedUpdates,
3232
unstable_createEventHandle,
33-
unstable_createPortal, // Temporary alias
3433
unstable_flushControlled,
3534
unstable_isNewReconciler,
3635
unstable_renderSubtreeIntoContainer,

packages/react-dom/index.experimental.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
export {
1111
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
1212
createPortal,
13-
createRoot as unstable_createRoot,
13+
createRoot,
1414
findDOMNode,
1515
flushSync,
1616
hydrate,
1717
render,
1818
unmountComponentAtNode,
1919
unstable_batchedUpdates,
20-
unstable_createPortal, // Temporary alias
2120
unstable_flushControlled,
2221
unstable_renderSubtreeIntoContainer,
2322
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.

0 commit comments

Comments
 (0)