Update entry point exports (#21488)

The following APIs have been added to the `react` stable entry point:
* `SuspenseList`
* `startTransition`
* `unstable_createMutableSource`
* `unstable_useMutableSource`
* `useDeferredValue`
* `useTransition`

The following APIs have been added or removed from the `react-dom` stable entry point:
* `createRoot`
* `unstable_createPortal` (removed)

The following APIs have been added to the `react-is` stable entry point:
* `SuspenseList`
* `isSuspenseList`

The following feature flags have been changed from experimental to true:
* `enableLazyElements`
* `enableSelectiveHydration`
* `enableSuspenseServerRenderer`
This commit is contained in:
Brian Vaughn
2021-05-12 11:28:14 -04:00
committed by GitHub
parent b8fda6cabc
commit 2bf4805e4b
92 changed files with 575 additions and 969 deletions

View File

@@ -10,7 +10,7 @@
import * as React from 'react';
import {
createContext,
unstable_startTransition as startTransition,
startTransition,
unstable_useCacheRefresh as useCacheRefresh,
useCallback,
useContext,

View File

@@ -11,7 +11,7 @@ import * as React from 'react';
import {
useContext,
unstable_useCacheRefresh as useCacheRefresh,
unstable_useTransition as useTransition,
useTransition,
} from 'react';
import Button from '../Button';
import ButtonIcon from '../ButtonIcon';

View File

@@ -8,12 +8,7 @@
*/
import * as React from 'react';
import {
unstable_useTransition as useTransition,
useContext,
useRef,
useState,
} from 'react';
import {useTransition, useContext, useRef, useState} from 'react';
import EditableName from './EditableName';
import EditableValue from './EditableValue';
import NewArrayValue from './NewArrayValue';

View File

@@ -34,7 +34,7 @@ import {
useMemo,
useReducer,
useRef,
unstable_startTransition as startTransition,
startTransition,
} from 'react';
import {createRegExp} from '../utils';
import {BridgeContext, StoreContext} from '../context';

View File

@@ -10,7 +10,7 @@
import type {Wakeable} from 'shared/ReactTypes';
import type {GitHubIssue} from './githubAPI';
import {unstable_getCacheForType} from 'react';
import {unstable_getCacheForType as getCacheForType} from 'react';
import {searchGitHubIssues} from './githubAPI';
const API_TIMEOUT = 3000;
@@ -55,7 +55,7 @@ function createMap(): GitHubIssueMap {
}
function getRecordMap(): Map<string, Record<GitHubIssue>> {
return unstable_getCacheForType(createMap);
return getCacheForType(createMap);
}
export function findGitHubIssue(errorMessage: string): GitHubIssue | null {