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

Add support for lazy loading Wasp routes #2007

Open
infomiho opened this issue May 5, 2024 · 0 comments
Open

Add support for lazy loading Wasp routes #2007

infomiho opened this issue May 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@infomiho
Copy link
Contributor

infomiho commented May 5, 2024

Quote from here:

Lazy loading is a strategy that defers the loading of non-essential resources until they are needed, reducing the initial loading time and improving the overall performance of the application. In React, we can achieve lazy loading using the lazy function and the Suspense component, introduced in React 16.6.

Our current React Router version (v5) supports using React.lazy: https://ui.dev/react-router-v5-code-splitting so it shouldn't be a big deal to implement this.

We should decide if we want to make this the default behaviour (some frameworks do this) or make it opt in.

Related Discord thread: https://ptb.discord.com/channels/686873244791210014/1236518598231588915/1236518598231588915

@infomiho infomiho added the enhancement New feature or request label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant