product-makers-hub / open-micro-saas

The Next.js SaaS boilerplate in Github
https://docs.openmicrosaas.org/
MIT License
55 stars 3 forks source link

Feature Request: Wrap transitions with Suspense or best optimal transitioning #17

Open lpolish opened 4 months ago

lpolish commented 4 months ago

Is your feature request related to a problem? Please describe. Highly charged html portions could take long to load specially if the user is under low bandwidth conditions and users might get a sense that the page is unresponsive.

Describe the solution you'd like Wrapping our sections between <Suspense /> components specially for spaces in which we would expect heavy loads like the main section or future menus or sidebars will add interactivity and dinamics to our application.

Is there any context that might help us understand? The Suspense is part of the React framework. I think this is the official docs for it: https://react.dev/reference/react/Suspense

Would you be willing to help by making a PR? Yes

Additional context Yes I can create a PR good question. To add to context yeah we could take advantage of this and make our SAAS website starting feel more like the application itself.

juan-carlos-correa commented 4 months ago

Hi @lpolish , thank you for your feature request!

Next.js 14 is currently implementing the React Suspense characteristic internally when using the ´loading.tsx´ components.

Here is that part of the docs.

Does that solves what you mentioned?

Also, do you have a specific view of the template that could have highly portions of html?