Skip to content

Sample project built with Suspense to demonstrate render-as-you-fetch

License

Notifications You must be signed in to change notification settings

kentcdodds/suspense-experimental-github-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Suspense Demo for Library Authors

⚠️ Warning: Highly Experimental ⚠️

I made this demo to complement Suspense for Data Fetching and Concurrent UI Patterns documentation. It is highly experimental and primarily aimed at library authors!

For a full explanation about this particular demo, read here. It uses a REST GitHub API with render-as-you-fetch pattern and a custom router.

A Better Demo

This demo took me a few hours and it's pretty rough. Its goal was to show one possible way to integrate Suspense with REST APIs without losing benefits of render-as-you-fetch paradigm.

After I published this, I realized that the Relay team has already built a more detailed demo here with cool features such as preloading on link hover--and its router is not even technically tied to Relay! So you might want to check out that one and compare them.

We plan to unify these demos to use shared infrastructure in the near term so the similarities and differences are more obvious.

About

Sample project built with Suspense to demonstrate render-as-you-fetch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.3%
  • HTML 11.0%
  • CSS 8.7%