0

I need to put together a loading screen, getting an animation to loop whilst the pages loads is no problem, but I would like to add both a visual of the percentage of the page loaded, and also pass the percentage as a prop to control an svg animation.

Most plugins/modules I've found have come up short.

  • look into this post [show percentage number in reactjs material ui progress bar](https://stackoverflow.com/q/51254333/11310328) – SKM Mar 02 '20 at 10:49

1 Answers1

0

You can try react-loadable.

This is a docs: https://github.com/jamiebuilds/react-loadable.

Well, I using the react-spinners plugin for loading animation: https://www.davidhu.io/react-spinners/

import Loadable from 'react-loadable'
import ClipLoader from "react-spinners/ClipLoader"

const HotelDetail = Loadable({ 
  loader: () => import('path/to/ComponentPage'),
  loading: ClipLoader 
})
Ryan Nghiem
  • 2,417
  • 2
  • 18
  • 28