How to load react on demand in the loading state that js has not finished loading? getComponent

react-router3
require.ensure ([], (require) = > {}) load on demand
I want to give js a loading state. How do I do this? Similar to a load bar at the top of the page

Nov.25,2021

this.setState({
  loading: true
});
require.ensure([], (require) => {
   require('../xxx.js');
   this.setState({
     loading: false
   });
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4615c-43ede.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4615c-43ede.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?