Skip to content

Show your loading element with a delay to increase perceived loading speed

Notifications You must be signed in to change notification settings

davidfloegel/delayed-loading-spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delayed loading

A quick example to delay the loading spinner until the request hits 1 second to reduce the amount of spinners and increase perceived loading speed.

Rules:

  • If loading takes less than 1second, show the content as soon as loading is finished
  • If loading takes more than 1 second but less than 2, show a spinner for full 2 seconds
  • If loading takes more than 2 seconds, show spinner until loading finishes

Try it

yarn install
yarn start

About

Show your loading element with a delay to increase perceived loading speed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published