3: React.lazy
load top-level routes and Settings areas of AuthLayoutRouter
#1323
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-up to #1322 and is entirely optional / a point of reference. I have tested it and it largely will only make things better, but can delay attention on this one until we are in cohesion on #1321 and #1322 both on which this is based.
NOTE: To code split the
MapExplorer
, which would be very helpful to site loading time we have only a small problem of the index + connector + component HOC chain problem not triggering the split when done from the router in PrimaryLayout (where it should be done).It should not be hard to solve, but I've let it be for later exploration. The WebPack chuncks config generally has what it needs for it to just work once we get that right. The things to enable it: Use React.Lazy, Suspense around the React Router Switch component. That's it!