Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
318 stars 53 forks source link

Next.js 14 Streaming + Suspense not working as expected #1473

Open Fedeorlandau opened 1 month ago

Fedeorlandau commented 1 month ago

Describe the bug

Streaming + Suspense isn't working on static web apps (nextjs hybrid website)

It waits until the async component finishes loading to render the entire page making the user have to wait a lot until the page is visible

To Reproduce Steps to reproduce the behavior:

Expected behavior The async component (product recommendations) should be loaded AFTER the initial render

Screenshots SWA Vercel
image image
image image

Device info (if applicable):

Additional context I believe that the azure functions that are being used behind the scenes don't support streaming. And thanks for your hard work bringing next 14 to azure.

joshke commented 3 weeks ago

+1 we tried to host our nextjs 14 on azure instead of vercel, but streaming and suspense is not working ..

Hatzilu commented 5 days ago

+1

same thing here. Suspense works great in my local environment, but it breaks when i deploy it to Azure SWA