tail is a customization prop for SuspenseList. It works in tandem with revealOrder and has three options: undefined, collapsed, and hidden.
These options can be used to configure how fallbacks are displayed.
undefined: show all fallbackshidden: show no fallbackscollapsed: show only the next fallback
Example:
<React.SuspenseList revealOrder="forwards" tail="collapsed"> <React.Suspense fallback={<div>Fetching Pokemon...</div>}> <ErrorBoundary fallback={"Couldn‘t catch ‘em all."}>
[React] Avoid Too Many Spinners with React SuspenseList’s tail Prop
原文:https://www.cnblogs.com/Answer1215/p/12764988.html