Coder Social home page Coder Social logo

ultrox / suspense-gaaron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gaearon/suspense-experimental-github-demo

0.0 0.0 0.0 227 KB

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

Home Page: https://reactjs.org/blog/2019/11/06/building-great-user-experiences-with-concurrent-mode-and-suspense.html

License: MIT License

HTML 10.86% JavaScript 80.58% CSS 8.56%

suspense-gaaron's Introduction

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 Blog Post

Joe Savona from the Relay team wrote a blog post that dives deeper into these topics: https://reactjs.org/blog/2019/11/06/building-great-user-experiences-with-concurrent-mode-and-suspense.html. Check it out!

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.

suspense-gaaron's People

Contributors

gaearon avatar kentcdodds avatar ultrox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.