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

[Architecture] Code splitting strategy #97

Open
reboottime opened this issue May 23, 2024 · 0 comments
Open

[Architecture] Code splitting strategy #97

reboottime opened this issue May 23, 2024 · 0 comments

Comments

@reboottime
Copy link
Owner

reboottime commented May 23, 2024

Solutions

  • Solution: loadable-components
    • split large library code
    • preload scripts based on user interaction
  • where to
    • apply suspense
    • apply error boundary
    • add proper loading effect
      • If you use loadable-component, consider add fallback at the loadable setup. In this way, you can define unique loading effect for each components
  • add transition effect
  • code splitting
    • based on route, load on demand
    • split large lib component and load it only if needed, such as user interaction, conditional rendering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant