首页 > 其他 > 详细

[React] Avoid Too Many Spinners with React SuspenseList’s tail Prop

时间:2020-04-24 09:42:21      阅读:69      评论:0      收藏:0      [点我收藏+]

tail is a customization prop for SuspenseList. It works in tandem with revealOrder and has three options: undefinedcollapsed, and hidden.

These options can be used to configure how fallbacks are displayed.

  • undefined: show all fallbacks
  • hidden: show no fallbacks
  • collapsed: 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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!