How streaming impacts React and Next.js applications

  Рет қаралды 28,180

Vercel

Vercel

3 ай бұрын

Streaming is the key to fast and dynamic web applications. Learn more about how it can help you improve the user experience of your site.
◆ Blog: vercel.com/blog/how-streaming...
◆ PPR: • Next.js Explained: Par...
◆ Core Web Vitals: • How Core Web Vitals af...
◆ Demo: partialprerendering.com
#vercel

Пікірлер: 26
@4ndrs_dev
@4ndrs_dev 3 ай бұрын
just this morning i used suspense in some routes with loading skeletons, really love how easy it is to set up and how fluid it feels with next.js
@DS-ow2ge
@DS-ow2ge 3 ай бұрын
damn lee you're on a tear..... you work so hard
@DS-ow2ge
@DS-ow2ge 3 ай бұрын
can you make a video about the partial pre rendering experimental features? I don't understand what that is, how its different from the ISR on pages router
@matt_hart
@matt_hart 3 ай бұрын
they did make a video on PPR. he mentioned it at the end of this video and it's in the description. but to quickly answer you, ISR lets you generate a fully static page to serve to users from a cdn anytime the previously generated static page gets out of date (you specify when the page becomes out of date). SSR means you render the entire page on a server for every request. PPR is like in between the two. you basically say what on your page should be static and that will be generated and served from a CDN for fast initial response, and then you can put elements in that same page that should be SSRed on every request for dynamic content, and they'll stream in and get inserted into your static page as the rendering finishes
@shekareditzz
@shekareditzz 3 ай бұрын
​@@DS-ow2ge😊😊😊😊😊😊😊😊😊
@shekareditzz
@shekareditzz 3 ай бұрын
​@@DS-ow2ge😊😊😊
@shekareditzz
@shekareditzz 3 ай бұрын
​@@DS-ow2ge😊😊
@thomasbouillon9478
@thomasbouillon9478 3 ай бұрын
I recently faced a drawback with that. Having component streaming also means having JS executing when these are loaded to update the DOM. This caused me a bad web viral in performance for having JS running for too long. I went back to ISR to fix it.
Ай бұрын
how does partial prerendering play with SEO? are the dynamic parts seen by the search engine crawlers?
@redenvalerio601
@redenvalerio601 3 ай бұрын
The problem I encounter is that loading.tsx returns 200 even after I send a notFound response meaning it will be treated badly by search engine. There's a bug report already and I'm still waiting for it to be resolved.
@franknguyen8396
@franknguyen8396 3 ай бұрын
Lee does it again
@kasper369
@kasper369 3 ай бұрын
I have a big CSS file how do I load CSS in stream way using shadcn
@martinumueller1
@martinumueller1 3 ай бұрын
I would like to see an example of authentication with Azure AD. Using msal.js directly or through next-auth. I am struggling with this and I think quite a few others are too.
@A03L
@A03L 3 ай бұрын
Code with antonio has a free masterclass of 8 hours about next auth v5 Check it out (it's not and ad, I really like the course )
@Nab_001
@Nab_001 3 ай бұрын
I love Vercel,
@swimmyJones
@swimmyJones 3 ай бұрын
I just posted about this on the discord but the Suspense and loading.tsx file stuff seems to work great on desktop but not at all on mobile and tablet devices. Idk if anybody else is experiencing that or if there’s something different I have to do for those devices, but hopefully it’s just a dumb mistake I’m making lol
@leerob
@leerob 3 ай бұрын
Should work the same! If you can pin down an issue, want to open it on the Next.js repo?
@swimmyJones
@swimmyJones 3 ай бұрын
@@leerob I did a post in the Next.js discord but the only response I’ve gotten was from someone not liking how I asked my question, so I’ll try posting in the repo as well.
@griffadev
@griffadev 3 ай бұрын
It's a shame the AI SDK streaming helpers are tied to AI would be nice primitives in next or a standalone library. Took a look at the code and it's widely complex though so maybe it's not worth it
@no_handle_no_problem
@no_handle_no_problem 3 ай бұрын
Here i thought you've done something with SSE
@NitinSharma00001
@NitinSharma00001 3 ай бұрын
Hey @leerob, I'm facing issues while setting environment variables for my client side(browser) application part as some of apis need to be called from client side only. The problem is during build time (Azure Devops pipeline), I don't know any environment variables, I just know those variables on app settings of server. I'm dockering my nextjs app so that I can stream my app for different environments (dev, stage, prod). I'm facing this issue for all NEXT_PUBLIC_ prefix variables as these got inlined (hardcoded) during build time. Can someone suggest any workaround or solution for this?
@francopoffo
@francopoffo 3 ай бұрын
i had a similar problem recently, my workaround was declaring the variable on my Dockerfile with: ARG NEXT_PUBLIC_VARIABLE, and then - docker build --build-arg NEXT_PUBLIC_VARIABLE=${VARIABLE THAT YOU NORMALLY SET ON GITHUB/GITLAB}
@paramaggarwal
@paramaggarwal 3 ай бұрын
Gave it the 100th like
@aralroca
@aralroca 3 ай бұрын
The rerendering of actions are using streaming virtual DOM? how it works to apply the diffing algorithm with streaming?
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 176 М.
Why I don't use React-Query and tRPC in Next.js
18:58
ByteGrad
Рет қаралды 69 М.
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 23 МЛН
it takes two to tango 💃🏻🕺🏻
00:18
Zach King
Рет қаралды 30 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
Bringing React Components to AI
12:41
Vercel
Рет қаралды 34 М.
Node.js runs on Turborepo now
8:08
Anthony Shew
Рет қаралды 3,2 М.
Next 13.4 | App router ещё не готов!
17:57
Евгений Паромов | Front-end
Рет қаралды 2,6 М.
This reminded myself of why I dislike Next.js
20:10
Web Dev Cody
Рет қаралды 51 М.
Trying to attack the Vercel Firewall
13:09
Vercel
Рет қаралды 12 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 148 М.
This UI component library is mind-blowing
8:23
Beyond Fireship
Рет қаралды 557 М.
Why I'm moving my side project from Vercel to AWS
15:47
Web Dev Cody
Рет қаралды 60 М.
Streaming components in Next is pretty interesting
5:59
Web Dev Cody
Рет қаралды 8 М.
ПК с Авито за 3000р
0:58
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН
Цифровые песочные часы с AliExpress
0:45
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,7 МЛН
МОЖНО ЛИ заряжать AirPods в чехле 🧐😱🧐 #airpods #applewatch #dyson
0:22
Apple_calls РЕПЛИКА №1 В РФ
Рет қаралды 21 М.
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 2 МЛН