Keep the prerendered page while loading external data
Hi @loteoo,
Whenever external static data is being loaded, there is an option to display a custom loader. Is it also possible to just show the prerendered markup while hyperstatic waits for the external data? Otherwise the page "jumps" in prerendered environments while data is being loaded.
For example on the following site which is running hyperstatic: https://www.jack-hunt.com/scheren/scheergel
- While the page loads the prerendered markdown is displayed
- When the js for hyperstatic is loaded, but not the external JSON-data for the page, the outlet rerenders with empty content.
- When the external JSON-data is done loading (in this case the title, introductory text below and products), the outlet rerenders again which then display the page as it was prerendered with all the functionality applied.
However in between step 2 and 3 there is a brief flash of empty content, depending on the network speed.
Hi @mdings !
Thank you for reporting this, this is indeed a bug in the new version of hyperstatic, I will try to fix it soon!
I'm currently redoing the demo / docs website and still am ironing out the final bumps with the new release, surprised that someone is using it already haha! ❤️
Well I actually noticed it already in the previous version so I did a checkout of V2 and encountered the same problem there. 😆
Just published a new version! Upgrade your project to 2.0.3 to check it out! Hopefully it works out all well :)
I updated the starter as well with the new version :)