You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rationale
The idea is to have a most minimal entry point to already be in a react context and lazily start bootstrapping the actual app. This is important for apps where the actual bundle grows in time and might take more than a few seconds to load. While the app hasn't loaded yet any errors (also fetch errors) will lead to a blank page and the user is wondering why he is staring at a blank content.
Therefore we'd like to achieve these things:
load the most basic bootstrapping environment that has only react and a react errror boundary to display possible erros when lazy loading the app. Also This must be wrapped in supsense with suspense using a loading indicator as a fallback. Keep in mind that again we don't use things like styled-components here as we'd like to keep the size of the entry point to a minimum. With this in place the loading can be showin in react and also errors will be displayed using the minimal error boundary. The user won't see a blank page in case of errors (unless the main bundle couldn't be fetched or caused an error).
entry point of the app is the minimal bootstraping file bootstrap.tsx
entry bundle (main bundle) must be as small as humanly possible. This must be verified using our bundle analyzer. Set maxEntryPointSize to a reasonably small value and show a warning if it has been exceedd (see the performance setting in the webpack docs: https://webpack.js.org/configuration/performance/)
entry bundle lazyloads src/index.tsx which again lazyloads src/App.tsx.
The text was updated successfully, but these errors were encountered:
Rationale
The idea is to have a most minimal entry point to already be in a react context and lazily start bootstrapping the actual app. This is important for apps where the actual bundle grows in time and might take more than a few seconds to load. While the app hasn't loaded yet any errors (also fetch errors) will lead to a blank page and the user is wondering why he is staring at a blank content.
Therefore we'd like to achieve these things:
In spirit, this is the render initial route as soon as possible aspect of the PRPL pattern.
DoD:
bootstrap.tsx
The text was updated successfully, but these errors were encountered: