Skip to content

Commit abf813b

Browse files
committed
Remove SuspenseList
1 parent f5cdbd7 commit abf813b

File tree

7 files changed

+3
-751
lines changed

7 files changed

+3
-751
lines changed

compat/src/index.d.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as _hooks from '../../hooks';
22
import * as preact from '../../src';
33
import { JSXInternal } from '../../src/jsx';
44
import * as _Suspense from './suspense';
5-
import * as _SuspenseList from './suspense-list';
65

76
interface SignalLike<T> {
87
value: T;
@@ -67,11 +66,10 @@ declare namespace React {
6766
export import ReactElement = preact.VNode;
6867
export import Consumer = preact.Consumer;
6968
export import ErrorInfo = preact.ErrorInfo;
70-
69+
7170
// Suspense
7271
export import Suspense = _Suspense.Suspense;
7372
export import lazy = _Suspense.lazy;
74-
export import SuspenseList = _SuspenseList.SuspenseList;
7573

7674
// Compat
7775
export import StrictMode = preact.Fragment;

compat/src/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { memo } from './memo';
2525
import { forwardRef } from './forwardRef';
2626
import { Children } from './Children';
2727
import { Suspense, lazy } from './suspense';
28-
import { SuspenseList } from './suspense-list';
2928
import { createPortal } from './portals';
3029
import { is } from './util';
3130
import {
@@ -241,7 +240,6 @@ export {
241240
unstable_batchedUpdates,
242241
StrictMode,
243242
Suspense,
244-
SuspenseList,
245243
lazy,
246244
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
247245
};
@@ -289,7 +287,6 @@ export default {
289287
unstable_batchedUpdates,
290288
StrictMode,
291289
Suspense,
292-
SuspenseList,
293290
lazy,
294291
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
295292
};

compat/src/suspense-list.d.ts

-14
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)