React - Display loading screen while DOM is rendering?

前端 未结 19 1738
我在风中等你
我在风中等你 2020-11-28 00:29

This is an example from Google Adsense application page. The loading screen displayed before the main page showed after.

I don\'t know how to do the same th

19条回答
  •  盖世英雄少女心
    2020-11-28 01:00

    What about using Pace

    Use this link address here.

    https://github.hubspot.com/pace/docs/welcome/

    1.On their website select the style you want and paste in index.css

    2.go to cdnjs Copy the link for Pace Js and add to your script tags in public/index.html

    3.It automatically detect web loads and displays the pace at the browser Top.

    You can also modify the height and animation in the css also.

提交回复
热议问题