Skip to content

Commit baaa3b9

Browse files
committed
Remove SuspenseList
1 parent eaa4655 commit baaa3b9

File tree

7 files changed

+2
-753
lines changed

7 files changed

+2
-753
lines changed

compat/src/index.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as _hooks from '../../hooks';
44
import * as preact from 'preact';
55
import { JSXInternal } from '../../src/jsx';
66
import * as _Suspense from './suspense';
7-
import * as _SuspenseList from './suspense-list';
87

98
interface SignalLike<T> {
109
value: T;
@@ -73,7 +72,6 @@ declare namespace React {
7372
// Suspense
7473
export import Suspense = _Suspense.Suspense;
7574
export import lazy = _Suspense.lazy;
76-
export import SuspenseList = _SuspenseList.SuspenseList;
7775

7876
// Compat
7977
export import StrictMode = preact.Fragment;

compat/src/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import { memo } from './memo';
3232
import { forwardRef } from './forwardRef';
3333
import { Children } from './Children';
3434
import { Suspense, lazy } from './suspense';
35-
import { SuspenseList } from './suspense-list';
3635
import { createPortal } from './portals';
3736
import {
3837
hydrate,
@@ -184,7 +183,6 @@ export {
184183
unstable_batchedUpdates,
185184
StrictMode,
186185
Suspense,
187-
SuspenseList,
188186
lazy,
189187
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
190188
};
@@ -232,7 +230,6 @@ export default {
232230
unstable_batchedUpdates,
233231
StrictMode,
234232
Suspense,
235-
SuspenseList,
236233
lazy,
237234
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
238235
};

compat/src/suspense-list.d.ts

-16
This file was deleted.

compat/src/suspense-list.js

-127
This file was deleted.

compat/src/suspense.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Suspense.prototype.render = function (props, state) {
217217

218218
/**
219219
* Checks and calls the parent component's _suspended method, passing in the
220-
* suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified
220+
* suspended vnode. This is a way for a parent to get notified
221221
* that one of its children/descendants suspended.
222222
*
223223
* The parent MAY return a callback. The callback will get called when the
@@ -232,7 +232,7 @@ Suspense.prototype.render = function (props, state) {
232232
* @param {import('./internal').VNode} vnode
233233
* @returns {((unsuspend: () => void) => void)?}
234234
*/
235-
export function suspended(vnode) {
235+
function suspended(vnode) {
236236
/** @type {import('./internal').Component} */
237237
let component = vnode._parent._component;
238238
return component && component._suspended && component._suspended(vnode);

0 commit comments

Comments
 (0)