css-suspense

css loading for react

  • 所有者: threepointone/css-suspense
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

css-suspense

loading css files, the suspense way.

(what is suspense?)

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

主要指标

概览
名称与所有者threepointone/css-suspense
主编程语言JavaScript
编程语言HTML (语言数: 3)
平台
许可证
所有者活动
创建于2018-07-26 21:11:20
推送于2020-10-15 14:26:53
最后一次提交2018-08-09 23:35:50
发布数2
最新版本名称v1.0.2 (发布于 2018-08-09 23:35:50)
第一版名称v1.0.1 (发布于 2018-07-27 22:44:21)
用户参与
星数307
关注者数7
派生数14
提交数24
已启用问题?
问题数2
打开的问题数0
拉请求数1
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?