css loading for react
Switch branches/tags
Nothing to show
Clone or download
Latest commit b4efa8a Aug 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example tighter Aug 9, 2018
src tighter Aug 9, 2018
vendor new api Jul 27, 2018
.babelrc first!!!11!! Jul 26, 2018
.flowconfig first!!!11!! Jul 26, 2018
.gitignore fix stuff, start invalidation stubs Jul 27, 2018
.parcelrc first!!!11!! Jul 26, 2018
README.md sibling content works fine! Aug 9, 2018
package.json 1.0.2 Aug 9, 2018
yarn.lock fix stuff, start invalidation stubs Jul 27, 2018

README.md

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