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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?