@samitouri / QOS-React-2 / commits / 103ed08c46

Remove shouldDeprioritizeSubtree from host config (#19124)

No longer being used.

Andrew Clark committed Jun 12, 2020 at 12:57 UTC 103ed08c46198d01119ef35c37d78c6bc89705db
17 files changed +10 -68
packages/react-art/src/ReactARTHostConfig.js
-4
@@ -323,10 +323,6 @@ export function resetTextContent(domElement) {
323 // Noop
324 }
325
326 -export function shouldDeprioritizeSubtree(type, props) {
327 - return false;
328 -}
329 -
326 export function getRootHostContext() {
327 return NO_CONTEXT;
328 }
packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js
+1 -4
@@ -91,10 +91,7 @@ describe('ReactDOMServerPartialHydration', () => {
91 // once the extra div wrapper is no longer neccessary.
92 function LegacyHiddenDiv({children, mode}) {
93 return (
94 - <div
95 - hidden={
96 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
97 - }>
94 + <div hidden={mode === 'hidden'}>
95 <React.unstable_LegacyHidden
96 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
97 {children}
packages/react-dom/src/__tests__/ReactUpdates-test.js
+1 -4
@@ -29,10 +29,7 @@ describe('ReactUpdates', () => {
29 // once the extra div wrapper is no longer neccessary.
30 function LegacyHiddenDiv({children, mode}) {
31 return (
32 - <div
33 - hidden={
34 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
35 - }>
32 + <div hidden={mode === 'hidden'}>
33 <React.unstable_LegacyHidden
34 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
35 {children}
packages/react-dom/src/client/ReactDOMHostConfig.js
-6
@@ -371,12 +371,6 @@ export function shouldSetTextContent(type: string, props: Props): boolean {
371 );
372 }
373
374 -export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
375 - // This is obnoxiously specific so that nobody uses it, but we can still opt
376 - // in via an infra-level userspace abstraction.
377 - return props.hidden === 'unstable-do-not-use-legacy-hidden';
378 -}
379 -
374 export function createTextInstance(
375 text: string,
376 rootContainerInstance: Container,
packages/react-native-renderer/src/ReactFabricHostConfig.js
-4
@@ -329,10 +329,6 @@ export function resetAfterCommit(containerInfo: Container): void {
329 // Noop
330 }
331
332 -export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
333 - return false;
334 -}
335 -
332 export function shouldSetTextContent(type: string, props: Props): boolean {
333 // TODO (bvaughn) Revisit this decision.
334 // Always returning false simplifies the createInstance() implementation,
packages/react-native-renderer/src/ReactNativeHostConfig.js
-4
@@ -248,10 +248,6 @@ export const scheduleTimeout = setTimeout;
248 export const cancelTimeout = clearTimeout;
249 export const noTimeout = -1;
250
251 -export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
252 - return false;
253 -}
254 -
251 export function shouldSetTextContent(type: string, props: Props): boolean {
252 // TODO (bvaughn) Revisit this decision.
253 // Always returning false simplifies the createInstance() implementation,
packages/react-noop-renderer/src/createReactNoop.js
-4
@@ -335,10 +335,6 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
335
336 shouldSetTextContent,
337
338 - shouldDeprioritizeSubtree(type: string, props: Props): boolean {
339 - return !!props.hidden;
340 - },
341 -
338 createTextInstance(
339 text: string,
340 rootContainerInstance: Container,
packages/react-reconciler/src/__tests__/ReactIncremental-test.js
+1 -4
@@ -28,10 +28,7 @@ describe('ReactIncremental', () => {
28 // once the extra div wrapper is no longer neccessary.
29 function LegacyHiddenDiv({children, mode}) {
30 return (
31 - <div
32 - hidden={
33 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
34 - }>
31 + <div hidden={mode === 'hidden'}>
32 <React.unstable_LegacyHidden
33 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
34 {children}
packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js
+1 -4
@@ -49,10 +49,7 @@ describe('ReactIncrementalErrorHandling', () => {
49 // once the extra div wrapper is no longer neccessary.
50 function LegacyHiddenDiv({children, mode}) {
51 return (
52 - <div
53 - hidden={
54 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
55 - }>
52 + <div hidden={mode === 'hidden'}>
53 <React.unstable_LegacyHidden
54 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
55 {children}
packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
+1 -4
@@ -42,10 +42,7 @@ describe('ReactIncrementalSideEffects', () => {
42 // once the extra div wrapper is no longer neccessary.
43 function LegacyHiddenDiv({children, mode}) {
44 return (
45 - <div
46 - hidden={
47 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
48 - }>
45 + <div hidden={mode === 'hidden'}>
46 <React.unstable_LegacyHidden
47 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
48 {children}
packages/react-reconciler/src/__tests__/ReactNewContext-test.js
+1 -4
@@ -46,10 +46,7 @@ describe('ReactNewContext', () => {
46 // once the extra div wrapper is no longer neccessary.
47 function LegacyHiddenDiv({children, mode}) {
48 return (
49 - <div
50 - hidden={
51 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
52 - }>
49 + <div hidden={mode === 'hidden'}>
50 <React.unstable_LegacyHidden
51 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
52 {children}
packages/react-reconciler/src/__tests__/ReactSchedulerIntegration-test.js
+1 -4
@@ -57,10 +57,7 @@ describe('ReactSchedulerIntegration', () => {
57 // once the extra div wrapper is no longer neccessary.
58 function LegacyHiddenDiv({children, mode}) {
59 return (
60 - <div
61 - hidden={
62 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
63 - }>
60 + <div hidden={mode === 'hidden'}>
61 <React.unstable_LegacyHidden
62 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
63 {children}
packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js
+1 -4
@@ -144,10 +144,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
144 // once the extra div wrapper is no longer neccessary.
145 function LegacyHiddenDiv({children, mode}) {
146 return (
147 - <div
148 - hidden={
149 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
150 - }>
147 + <div hidden={mode === 'hidden'}>
148 <React.unstable_LegacyHidden
149 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
150 {children}
packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js
-2
@@ -51,8 +51,6 @@ export const appendInitialChild = $$$hostConfig.appendInitialChild;
51 export const finalizeInitialChildren = $$$hostConfig.finalizeInitialChildren;
52 export const prepareUpdate = $$$hostConfig.prepareUpdate;
53 export const shouldSetTextContent = $$$hostConfig.shouldSetTextContent;
54 -export const shouldDeprioritizeSubtree =
55 - $$$hostConfig.shouldDeprioritizeSubtree;
54 export const createTextInstance = $$$hostConfig.createTextInstance;
55 export const scheduleTimeout = $$$hostConfig.scheduleTimeout;
56 export const cancelTimeout = $$$hostConfig.cancelTimeout;
packages/react-refresh/src/__tests__/ReactFresh-test.js
+1 -4
@@ -79,10 +79,7 @@ describe('ReactFresh', () => {
79 // once the extra div wrapper is no longer neccessary.
80 function LegacyHiddenDiv({children, mode}) {
81 return (
82 - <div
83 - hidden={
84 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
85 - }>
82 + <div hidden={mode === 'hidden'}>
83 <React.unstable_LegacyHidden
84 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
85 {children}
packages/react-test-renderer/src/ReactTestHostConfig.js
-4
@@ -218,10 +218,6 @@ export function shouldSetTextContent(type: string, props: Props): boolean {
218 return false;
219 }
220
221 -export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
222 - return false;
223 -}
224 -
221 export function createTextInstance(
222 text: string,
223 rootContainerInstance: Container,
packages/react/src/__tests__/ReactDOMTracing-test.internal.js
+1 -4
@@ -59,10 +59,7 @@ function loadModules() {
59 // the extra div wrapper is no longer neccessary.
60 function LegacyHiddenDiv({children, mode}) {
61 return (
62 - <div
63 - hidden={
64 - mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
65 - }>
62 + <div hidden={mode === 'hidden'}>
63 <React.unstable_LegacyHidden
64 mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
65 {children}