admin管理员组

文章数量:1399465

I am using react lazy load ponent npm library, How can I know whether its working or not? I have used onContentVisible which is available in react lazy load ponent library docs. Even Without scrolling, In developer tools, Network tab says 84 requests are sent which is the maximum requests for my web page. How can I figure it out?

I am using react lazy load ponent npm library, How can I know whether its working or not? I have used onContentVisible which is available in react lazy load ponent library docs. Even Without scrolling, In developer tools, Network tab says 84 requests are sent which is the maximum requests for my web page. How can I figure it out?

Share Improve this question edited Apr 17, 2019 at 12:33 Harish Kulkarni asked Nov 21, 2018 at 12:50 Harish KulkarniHarish Kulkarni 1,61114 silver badges18 bronze badges 7
  • Are you using any node module to achieve React Lazy load ponent or React.lazy? – Varit J Patel Commented Nov 21, 2018 at 12:58
  • Yes I am using - React lazy load ponent – Harish Kulkarni Commented Nov 21, 2018 at 13:00
  • In order to figure out if the lazy ponent, you need to invoke that ponent. – Varit J Patel Commented Nov 21, 2018 at 13:06
  • Invoke?How? I have read docs and used as per docs. onContentVisible is working. Couldn't exactly know whether is working or not? – Harish Kulkarni Commented Nov 21, 2018 at 13:20
  • 1 It seems that you are not using official React.lazy reactjs/docs/code-splitting.html#reactlazy. I think that you are using react-lazy-load npm module because it supports onContentVisible. Kindly add more information about what you are using and add minimal reproducible example – Abdul Rauf Commented Nov 21, 2018 at 16:14
 |  Show 2 more ments

1 Answer 1

Reset to default 8

In Chrome dev tools, press mand-shift-p (Mac) or control-shift-p (Windows) to open the mand menu. Select Show Coverage and click the Reload button and reload your home page, and Chrome will show you what has loaded.

本文标签: javascriptHow to know if React lazy load component is working or not React jsStack Overflow