i am using react-loadable to load the component when required but in react-loadable we have to show some loading component till the component get loaded in background but i want to show previous component till the next component get loaded. Please help me with this issue. Note - i am doing route based code splitting using webpack.
Asked
Active
Viewed 76 times
0
-
so, how about showing the code you have till now? – Icepickle Aug 16 '18 at 20:08
-
yes i want to show the component from which new route is triggered till the next component bundle get loaded but how?? – shubhamsoni136 Aug 16 '18 at 20:12
-
You can't because you have already entered that route and the promise is being resolved at that time... – PlayMa256 Aug 17 '18 at 01:00
-
Check https://www.hackerrank.com/dashboard they are doing route based routing and when we navigate from practice to contest section previous component remains there till next component get loaded. – shubhamsoni136 Aug 17 '18 at 05:02