项目
在 GitHub 查看
threepointone/css-suspense
关于
用于 React 的 CSS 加载效果。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文css-suspense
loading css files, the suspense way.
requirements
- don't inline css into the js bundle
- while server rendering, inline
<link>tags, enabling progressive css - on client side, suspend rendering till the css loads (with optional fallback ui)
- render synchronously if already loaded
api
the api is a boring Stylesheet tag.
<Stylesheet href='/path/to/style.css'/>
{/* this content will not render to dom
until the stylesheet finishes loading */}
<span className='big'>what up what up</span>
todo
- unload styles that aren't used (needs
SimpleCacheProvider::invalidate) - tests etc etc
探索相关项目
加载中…