Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3: React.lazy load top-level routes and Settings areas of AuthLayoutRouter #1323

Draft
wants to merge 3 commits into
base: improve-mobile-editor-performance
Choose a base branch
from

Conversation

lorenjohnson
Copy link
Member

@lorenjohnson lorenjohnson commented Oct 21, 2022

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!

@lorenjohnson lorenjohnson temporarily deployed to hylo-evo-pr-1323 October 21, 2022 19:16 Inactive
@lorenjohnson lorenjohnson self-assigned this Oct 21, 2022
@lorenjohnson lorenjohnson changed the title React.lazy load top-level routes and Settings areas of AuthLayoutRouter 3: React.lazy load top-level routes and Settings areas of AuthLayoutRouter Oct 22, 2022
@lorenjohnson lorenjohnson temporarily deployed to hylo-evo-pr-1323 October 24, 2022 05:43 Inactive
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 49.12% // Head: 49.12% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (339a42e) compared to base (5bd9a6e).
Patch coverage: 76.92% of modified lines in pull request are covered.

Additional details and impacted files
@@                        Coverage Diff                         @@
##           improve-mobile-editor-performance    #1323   +/-   ##
==================================================================
  Coverage                              49.12%   49.12%           
==================================================================
  Files                                    542      542           
  Lines                                  12066    12071    +5     
  Branches                                3445     3445           
==================================================================
+ Hits                                    5927     5930    +3     
- Misses                                  6139     6141    +2     
Impacted Files Coverage Δ
src/routes/AuthLayoutRouter/AuthLayoutRouter.js 83.33% <70.00%> (+0.33%) ⬆️
src/routes/RootRouter/RootRouter.js 33.33% <100.00%> (+5.55%) ⬆️
...rc/routes/PublicLayoutRouter/PublicLayoutRouter.js 0.00% <0.00%> (-9.10%) ⬇️
src/routes/UserSettings/UserSettings.connector.js 81.48% <0.00%> (-3.71%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lorenjohnson lorenjohnson temporarily deployed to hylo-evo-pr-1323 October 24, 2022 07:15 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant