Skip to content

Commit

Permalink
Cleanup unused unstable_startTransition, unstable_useTransition, unst…
Browse files Browse the repository at this point in the history
…able_useDeferredValue exports from fb packages (facebook#27056)

## Summary

came across these TODOs – an internal grep indicated that remaining
callsites have been cleaned up, so these can now be removed.

## How did you test this change?

```
yarn flow dom-browser
yarn test
```
  • Loading branch information
noahlemen authored and AndyPengc12 committed Apr 15, 2024
1 parent a9d33a4 commit f7f72cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions fixtures/concurrent/time-slicing/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {PureComponent, unstable_startTransition} from 'react';
import React, {PureComponent, startTransition} from 'react';
import {createRoot} from 'react-dom/client';
import _ from 'lodash';
import Charts from './Charts';
Expand Down Expand Up @@ -64,7 +64,7 @@ class App extends PureComponent {
}
this._ignoreClick = true;

unstable_startTransition(() => {
startTransition(() => {
this.setState({showDemo: true}, () => {
this._ignoreClick = false;
});
Expand Down Expand Up @@ -103,7 +103,7 @@ class App extends PureComponent {
break;
case 'async':
// TODO: useTransition hook instead.
unstable_startTransition(() => {
startTransition(() => {
this.setState({value});
});
break;
Expand Down
3 changes: 0 additions & 3 deletions packages/react/index.classic.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export {
memo,
cache,
startTransition,
startTransition as unstable_startTransition, // TODO: Remove once call sights updated to startTransition
unstable_Cache,
unstable_TracingMarker,
unstable_DebugTracingMode,
Expand All @@ -48,7 +47,6 @@ export {
useContext,
useDebugValue,
useDeferredValue,
useDeferredValue as unstable_useDeferredValue, // TODO: Remove once call sights updated to useDeferredValue
useEffect,
experimental_useEffectEvent,
useImperativeHandle,
Expand All @@ -61,7 +59,6 @@ export {
useState,
useSyncExternalStore,
useTransition,
useTransition as unstable_useTransition, // TODO: Remove once call sights updated to useTransition
version,
} from './src/React';
export {jsx, jsxs, jsxDEV} from './src/jsx/ReactJSX';
3 changes: 0 additions & 3 deletions packages/react/index.modern.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export {
memo,
cache,
startTransition,
startTransition as unstable_startTransition, // TODO: Remove once call sights updated to startTransition
unstable_Cache,
unstable_DebugTracingMode,
unstable_LegacyHidden,
Expand All @@ -46,7 +45,6 @@ export {
useContext,
useDebugValue,
useDeferredValue,
useDeferredValue as unstable_useDeferredValue, // TODO: Remove once call sights updated to useDeferredValue
useEffect,
experimental_useEffectEvent,
useImperativeHandle,
Expand All @@ -59,7 +57,6 @@ export {
useState,
useSyncExternalStore,
useTransition,
useTransition as unstable_useTransition, // TODO: Remove once call sights updated to useTransition
version,
} from './src/React';
export {jsx, jsxs, jsxDEV} from './src/jsx/ReactJSX';

0 comments on commit f7f72cb

Please sign in to comment.