React Suspense: "A generic way for components to suspend rendering while they load asynchronous data" - Dan Abramov
https://romaindso.github.io/react-suspense-demo/
3 mini apps to experiments with React Suspense
- Todolist
- Pokédex (with images)
- Component's lazy loading
Use the menu to navigate between these 3 examples.
Refresh the page to see React Suspense in action
npm install
npm start
- checkout facebook/react
- set enableStableConcurrentModeAPIs = true in
ReactFeatureFlags.js
- run
yarn build
- copy
build/dist/*
to some dir in your project - setup alias: {react: ‘dir/react.whatever.js’ (and react-dom, etc) in webpack/parcel/etc config
Credits: @threepointone
MIT