I like the intent with this type of video, but there’s quite a bit of assumed knowledge here that makes it hard to follow - especially if you’re not already deep in the App Router/RSC world. Things that were stumbling blocks for me: What is Bun and why are you using it? We’re reading cookies on the server, not the client (I know you mentioned Node.js, but this bears saying explicitly). There’s a circular dependency between the two modules, index and user, in this example; is this just to keep the demo simple, or would you structure these modules this way in the real world? Why is rendering an async operation?
I still don’t get it the point of this clip. No idea about Bun, but I can response with cookie something like res.cookie(‘Name’, ‘John’) in express. So what’s the point of using nextjs?
Wouldn't that be weird if you run Nextjs on a lambda? For example if the user logged in and didn't use the app for some time and the lambda was shut down, well he simply lost his session I suppose if you used cookies to store session like this
I suppose when a new request comes in, the cookie store will be recreated since it's more of sharing data during the request. And it will always get the cookies from the client or browser request header as seen in parseCookies function so during any request, it will be fresh data from the request.
Would love more videos like this, explaining how Next works under the hood!
I like the intent with this type of video, but there’s quite a bit of assumed knowledge here that makes it hard to follow - especially if you’re not already deep in the App Router/RSC world. Things that were stumbling blocks for me: What is Bun and why are you using it? We’re reading cookies on the server, not the client (I know you mentioned Node.js, but this bears saying explicitly). There’s a circular dependency between the two modules, index and user, in this example; is this just to keep the demo simple, or would you structure these modules this way in the real world? Why is rendering an async operation?
That's cool! I like this format, thank you for making these videos
Glad you found it helpful!
nice, please create more in-depth videos like this
Awesome, so this would theoretically work with the pages router too in a next 12 app that doesn't have access to cookies yet?
can we apply the same idea for params and searchParams instead of sending it as props to the page component in nextjs ?
Can AsyncLocalStorage be used across Middleware and Server Components?
what vs code theme are you using
pretty neat stuff
More under the hood videos please
Let's eat that cookie 😂!
Nice video
AsyncLocalStorage is awesome 😃👌
Can't wait for it to be standardised in runtimes. AsyncContext is stage 2, wonder if it will move up soon.
Use cookies() === bye bye SSG?
How do you properly handle localstorage in a next js app
I still don’t get it the point of this clip. No idea about Bun, but I can response with cookie something like res.cookie(‘Name’, ‘John’) in express. So what’s the point of using nextjs?
Can we use that API ourselves as well? To store contexty things like current language?
Yes it is already used in react native project as a cache
It is like built-in redis
Wouldn't that be weird if you run Nextjs on a lambda? For example if the user logged in and didn't use the app for some time and the lambda was shut down, well he simply lost his session I suppose if you used cookies to store session like this
I suppose when a new request comes in, the cookie store will be recreated since it's more of sharing data during the request. And it will always get the cookies from the client or browser request header as seen in parseCookies function so during any request, it will be fresh data from the request.
great series!
please remove nextjs repo. what a terrible framework but i have to learn it to eat bread.
Nextjs died with 13