sunmao-ui
sunmao-ui copied to clipboard
perf: how to do code split in a sunmao-ui application
What problem does this feature solve?
When we talk about web UI performance, load speed is one of the most important metrics. The basic idea of improving load speed is to do code splits which let the browser lazy load code.
The code split technical is widely used in our daily development, but in sunmao-ui, we do not have the equivalent ability yet.
lazy load component and trait
TBD
split application schema
TBD
What does the proposed API look like?
TBD
Module is one of the ways to split code. It can not only wrap components(which makes the leftTree clearer), but also prevent user using global state everywhere.
In this issue #417, we discussed using application to render module which means we could use multiple nested sunmao instance to render an appliaction. Further more, we can use router component to render multiple pages application.