-
Could the React scripts be loaded with "defer" attributes to shave off a few ms on loading time? Since server rendering is used I believe it should have a positive impact on the initial load. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi @AlexxEG - I passed this onto our team's React SME, who informed me that we load extension dependencies as modules with a library called SystemJS. SystemJS already loads modules with a "deferred execution" mode, so extension dependencies should already be loaded with "defer" by default. |
Beta Was this translation helpful? Give feedback.
-
Hey @madyke - I was referring to the "react.production.min.js" and "react-dom.production.min.js" scripts that are at the bottom of the body. Could it be beneficial to move these to the head and add the "defer" attribute to them instead so that they're loaded async while the HTML is parsed? Unless of course there is a specific reason it's done the way it is now. |
Beta Was this translation helpful? Give feedback.
-
Hey @AlexxEG, Brady |
Beta Was this translation helpful? Give feedback.
Hey @AlexxEG,
We are looking at using defer for the react scripts in the near future. We just need to make sure it doesn't cause any other interesting issues when we enable it. Currently put the react scripts at the bottom of the body to let the render happen before loading the script.
Brady