you the best teacher i ever met , for real no matter how much i say thank you , you deserve more , always explaning in the best way , i wish someday see you holding the best teacher in the world reward
One thing you are missing. Using Suspense for data fetching was an experimental feature from React. The true fault is with TanStack as they pushed an implementation of an experimental feature as production ready. SWR marked it as experimental; TanStack should have too. The React team is taking responsibility for something they didn't do.
A lot of projects relied in the experimental suspense component. Not just tanstack query. React was released suspense 6 years ago. It also feels like the old way suspense worked that did work in parallel just makes more sense
@@collinoly Suspense is old but intended for lazy loading, initially. Data fetching was recently added as experimental with the use hook. Lazy loading still works fine. For data fetching, use hook is only intended to throw promises (created further up the render tree than the nearest suspense boundary): here is the mistake by TanStack query as it works by throwing promise from where it's created. That's not how data fetching using Suspense was designed to work. Technically, TanStack query violated rules of react that was yet to be written.
But how else TanStack could have worked? Only way to not throw the promise where was created is to do some Apollo level magic, which seems WAY too complicated for simple non-server rendered SPA. Of course you can lift the data fetching up the tree and that is what should be done most of the time. But sometimes... you just don't want to... I think the React team REALLY wants us to use some framework to develop React with (to the point it being suspect), but that's just not something many of us need or are willing to do. JS backend ecosystem just isn't very good. I think we are seeing a point where Facebook's needs are not matching with the needs of most React apps. I understand that continuing the render after the first promise is thrown is not "optimal", but that just isn't a problem for majority of React apps. What I don't understand is why they couldn't make Suspense somehow configurable so that it can serve both.
@@jonikyronlahti i don't think they did it just to optimize render. Throwing promises where it's created can create race conditions. Sure, you can memoize it to fix the issue, but it's just treating the symptom. Moving it up the tree is not that big of a deal, especially when you consider that how it used to work still doesn't work, you could have had multiple fetches in the same component that were independent but once the first promise is thrown, the execution stops for that component (before and after the change), react team just extended it a bit outwards. And remember, using Suspense for data fetch is a luxury, there's still the good old loading state. For how tan stack could have implemented it, I'd say return a promise instead of the data which you can await using the use hook down the tree, not that hard.
Hey Max! I’m loving the Code & Curiosity podcast. If you’ve run out of topics again, I’m totally up for a brainstorming session😂. Just as long as I keep getting my regular episodes! Say hi to Manuel for me.
Thankfully it was (alongside the NextJs in general) the tipping point where I decided to switch to Svelte and SvelteKit. And boy oh boy, that was a bliss! I found joy in coding once again! React is dead to me
I'm sick of React and Next.js and all other “frameworks”. I made my own website with Go, HTMX and vanilla JS. I don't want to learn the same thing over and over again.
I understand your frustration, I really do, that is why I don't bother learning other ways of building the same thing, if you go with Go/HTMX/Js that is great. For me, my choice will be always Angular, why? Angular is the only one that deserved to be called a proper FRAMEWORK since it gives you EVERYTHING you need right from the start, everything! Sure, you can install other packages such as redux/ngrx along with material or primeNg, etc... but those are minimal (it depends on the project ofc). When it comes to upgrade your Angular apps, is walk in a park, routes, state management, guards, services, signals, components, directives, everything gets updated all in once! For me Angular is = stability in my opinion.
Why would you even build a personal website with React/Nextjs? You are frustrated because you were using the wrong tool for the job? If you did it as a learning experience, then fine. React and Next.js aren't for everything, but I would never build a web application without using some framework. Try building a SASS application with Go, HTMX and vanilla JS and report back how it went and how frustrating it has been.
Hello max sir, I'm from india, present generation is good at artificial intelligence and machine learning as compared to web development.Is still have future for web development course,what is your opinion.And I'm studying B-Tech final year Computer science and Engineering,can you please give me a suggestion to me to become a artificial engineer and machine learning Engineer (or) a web developer, please give reply to me sir,In future if I get a good job for your guidance I will meet you sir❤❤❤❤❤❤❤❤
react v19 can't stable release. and react native never version 1... they being beggar on expo this is why switch to svelte and flutter. but I give a chance on react-v19.
Play it @ 1.5x
😭😭
me 2.5x
1.75
burns on brain makes us forget we can do that. ty
you the best teacher i ever met , for real no matter how much i say thank you , you deserve more , always explaning in the best way , i wish someday see you holding the best teacher in the world reward
One thing you are missing. Using Suspense for data fetching was an experimental feature from React. The true fault is with TanStack as they pushed an implementation of an experimental feature as production ready. SWR marked it as experimental; TanStack should have too. The React team is taking responsibility for something they didn't do.
A lot of projects relied in the experimental suspense component. Not just tanstack query. React was released suspense 6 years ago. It also feels like the old way suspense worked that did work in parallel just makes more sense
@@collinoly Suspense is old but intended for lazy loading, initially. Data fetching was recently added as experimental with the use hook. Lazy loading still works fine. For data fetching, use hook is only intended to throw promises (created further up the render tree than the nearest suspense boundary): here is the mistake by TanStack query as it works by throwing promise from where it's created. That's not how data fetching using Suspense was designed to work. Technically, TanStack query violated rules of react that was yet to be written.
But how else TanStack could have worked? Only way to not throw the promise where was created is to do some Apollo level magic, which seems WAY too complicated for simple non-server rendered SPA. Of course you can lift the data fetching up the tree and that is what should be done most of the time. But sometimes... you just don't want to...
I think the React team REALLY wants us to use some framework to develop React with (to the point it being suspect), but that's just not something many of us need or are willing to do. JS backend ecosystem just isn't very good.
I think we are seeing a point where Facebook's needs are not matching with the needs of most React apps. I understand that continuing the render after the first promise is thrown is not "optimal", but that just isn't a problem for majority of React apps. What I don't understand is why they couldn't make Suspense somehow configurable so that it can serve both.
@@jonikyronlahti i don't think they did it just to optimize render. Throwing promises where it's created can create race conditions. Sure, you can memoize it to fix the issue, but it's just treating the symptom.
Moving it up the tree is not that big of a deal, especially when you consider that how it used to work still doesn't work, you could have had multiple fetches in the same component that were independent but once the first promise is thrown, the execution stops for that component (before and after the change), react team just extended it a bit outwards. And remember, using Suspense for data fetch is a luxury, there's still the good old loading state.
For how tan stack could have implemented it, I'd say return a promise instead of the data which you can await using the use hook down the tree, not that hard.
Hello max, on a side note will there be any update on the GO course with more content?
And any news on Sveltekit?
Just wondering why couldnt they make it an option to do parallel or waterfall instead? Or just doesnt work like that.
Hello Max, Which software do you use to draw your rectangles and arrows to highlight text.
I remember Max said once that he uses plain Power Point docs, but don't quote me on that.
Hi Max, I'm subscribed to your React course. I wanted to know if you’ll be adding React 19 to the course soon?
It's been 86yrs 😢
Still no signals
Welcome back Max ! When can we expect " Laravel 11 The complete guide 2025 " ? 😀 ( please sensei, do it for all of us 🥺)
Who writes a book on React? Ever changing framework !
Hey Max! I’m loving the Code & Curiosity podcast. If you’ve run out of topics again, I’m totally up for a brainstorming session😂. Just as long as I keep getting my regular episodes! Say hi to Manuel for me.
As always good to watch you 🙂
glad to have you back!
Thanks a lot dear mentor 🙏
and thats why nextjs holds back partial prerendering?
It's base is not Solid(JS) 😅
will online curse be updated too ?
Thankfully it was (alongside the NextJs in general) the tipping point where I decided to switch to Svelte and SvelteKit. And boy oh boy, that was a bliss! I found joy in coding once again!
React is dead to me
I will never use the suspense thing. The code is much easier to understand and more predictable with a ternary "if loading else render"
Yeah, Suspense feels too much like magic. Even the docs don't actually explain how it works, just saying that it does...
@TheItamarp thanks. I thought i was the only one
Link to book page is broken.
Please talk about react native new releases
expo 52 will be interesting with the new 0.76 RN
Hi bro
do you need a thumbnail designer ?
I'm sick of React and Next.js and all other “frameworks”. I made my own website with Go, HTMX and vanilla JS.
I don't want to learn the same thing over and over again.
To avoid using big JS frameworks/librariers you used another big JS library
@@dawidziomalify the difference is that you just sprinkle in some HTMX. It's not like React where you're often reinventing things.
I understand your frustration, I really do, that is why I don't bother learning other ways of building the same thing, if you go with Go/HTMX/Js that is great. For me, my choice will be always Angular, why? Angular is the only one that deserved to be called a proper FRAMEWORK since it gives you EVERYTHING you need right from the start, everything! Sure, you can install other packages such as redux/ngrx along with material or primeNg, etc... but those are minimal (it depends on the project ofc).
When it comes to upgrade your Angular apps, is walk in a park, routes, state management, guards, services, signals, components, directives, everything gets updated all in once!
For me Angular is = stability in my opinion.
Yeah man i feel you. Js frameworks are always changing. I feel overwhelming too.
Why would you even build a personal website with React/Nextjs? You are frustrated because you were using the wrong tool for the job? If you did it as a learning experience, then fine. React and Next.js aren't for everything, but I would never build a web application without using some framework. Try building a SASS application with Go, HTMX and vanilla JS and report back how it went and how frustrating it has been.
Hello max sir, I'm from india, present generation is good at artificial intelligence and machine learning as compared to web development.Is still have future for web development course,what is your opinion.And I'm studying B-Tech final year Computer science and Engineering,can you please give me a suggestion to me to become a artificial engineer and machine learning Engineer (or) a web developer, please give reply to me sir,In future if I get a good job for your guidance I will meet you sir❤❤❤❤❤❤❤❤
react v19 can't stable release. and react native never version 1... they being beggar on expo
this is why switch to svelte and flutter. but I give a chance on react-v19.
First
I'm fed up with all this rubbish...they invent all kinds of nonsense
In fact..who really use react in production?
Any Hacker make a video on React.js Elaetron.js React Native.js With 1 backend and Database