Remove shouldDeprioritizeSubtree from host config (#19124)
No longer being used.
This commit is contained in:
parent
8f05f2bd6d
commit
103ed08c46
|
@ -323,10 +323,6 @@ export function resetTextContent(domElement) {
|
|||
// Noop
|
||||
}
|
||||
|
||||
export function shouldDeprioritizeSubtree(type, props) {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function getRootHostContext() {
|
||||
return NO_CONTEXT;
|
||||
}
|
||||
|
|
|
@ -91,10 +91,7 @@ describe('ReactDOMServerPartialHydration', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -29,10 +29,7 @@ describe('ReactUpdates', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -371,12 +371,6 @@ export function shouldSetTextContent(type: string, props: Props): boolean {
|
|||
);
|
||||
}
|
||||
|
||||
export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
|
||||
// This is obnoxiously specific so that nobody uses it, but we can still opt
|
||||
// in via an infra-level userspace abstraction.
|
||||
return props.hidden === 'unstable-do-not-use-legacy-hidden';
|
||||
}
|
||||
|
||||
export function createTextInstance(
|
||||
text: string,
|
||||
rootContainerInstance: Container,
|
||||
|
|
|
@ -329,10 +329,6 @@ export function resetAfterCommit(containerInfo: Container): void {
|
|||
// Noop
|
||||
}
|
||||
|
||||
export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function shouldSetTextContent(type: string, props: Props): boolean {
|
||||
// TODO (bvaughn) Revisit this decision.
|
||||
// Always returning false simplifies the createInstance() implementation,
|
||||
|
|
|
@ -248,10 +248,6 @@ export const scheduleTimeout = setTimeout;
|
|||
export const cancelTimeout = clearTimeout;
|
||||
export const noTimeout = -1;
|
||||
|
||||
export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function shouldSetTextContent(type: string, props: Props): boolean {
|
||||
// TODO (bvaughn) Revisit this decision.
|
||||
// Always returning false simplifies the createInstance() implementation,
|
||||
|
|
|
@ -335,10 +335,6 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
|
|||
|
||||
shouldSetTextContent,
|
||||
|
||||
shouldDeprioritizeSubtree(type: string, props: Props): boolean {
|
||||
return !!props.hidden;
|
||||
},
|
||||
|
||||
createTextInstance(
|
||||
text: string,
|
||||
rootContainerInstance: Container,
|
||||
|
|
|
@ -28,10 +28,7 @@ describe('ReactIncremental', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -49,10 +49,7 @@ describe('ReactIncrementalErrorHandling', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -42,10 +42,7 @@ describe('ReactIncrementalSideEffects', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -46,10 +46,7 @@ describe('ReactNewContext', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -57,10 +57,7 @@ describe('ReactSchedulerIntegration', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -144,10 +144,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -51,8 +51,6 @@ export const appendInitialChild = $$$hostConfig.appendInitialChild;
|
|||
export const finalizeInitialChildren = $$$hostConfig.finalizeInitialChildren;
|
||||
export const prepareUpdate = $$$hostConfig.prepareUpdate;
|
||||
export const shouldSetTextContent = $$$hostConfig.shouldSetTextContent;
|
||||
export const shouldDeprioritizeSubtree =
|
||||
$$$hostConfig.shouldDeprioritizeSubtree;
|
||||
export const createTextInstance = $$$hostConfig.createTextInstance;
|
||||
export const scheduleTimeout = $$$hostConfig.scheduleTimeout;
|
||||
export const cancelTimeout = $$$hostConfig.cancelTimeout;
|
||||
|
|
|
@ -79,10 +79,7 @@ describe('ReactFresh', () => {
|
|||
// once the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
|
@ -218,10 +218,6 @@ export function shouldSetTextContent(type: string, props: Props): boolean {
|
|||
return false;
|
||||
}
|
||||
|
||||
export function shouldDeprioritizeSubtree(type: string, props: Props): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function createTextInstance(
|
||||
text: string,
|
||||
rootContainerInstance: Container,
|
||||
|
|
|
@ -59,10 +59,7 @@ function loadModules() {
|
|||
// the extra div wrapper is no longer neccessary.
|
||||
function LegacyHiddenDiv({children, mode}) {
|
||||
return (
|
||||
<div
|
||||
hidden={
|
||||
mode === 'hidden' ? 'unstable-do-not-use-legacy-hidden' : undefined
|
||||
}>
|
||||
<div hidden={mode === 'hidden'}>
|
||||
<React.unstable_LegacyHidden
|
||||
mode={mode === 'hidden' ? 'unstable-defer-without-hiding' : mode}>
|
||||
{children}
|
||||
|
|
Loading…
Reference in New Issue