why I am unable to see chache HIT or skip. I have added this in next config logging: { fetches: { fullUrl: true, } }
@mrjester19 сағат бұрын
f
@tommycallsubackКүн бұрын
can we do "stale while revalidate" without using react query? (With Next 14, RSC). I want my routes dynamic but when user goes to route, he initially should see stale cache of his previous visit to the route during the same session. Suspense loading should be only shown in the first visit to route.
@zwill88823 күн бұрын
Y'all are an incredibly impressive team and Lee is doing a great job explaining all of it.
@anupamsagar79253 күн бұрын
how to make route.js in new app roouter i am not using pages router
@devJefferson3 күн бұрын
Bro failed the 5 minutes 😄, But still the best video 👍
@PUTTEKOOL5 күн бұрын
I suppose the first Date.now() value comes from the server, gnarly inception 😄
@relaxchannelforyour5 күн бұрын
Вообще не помогло
@ShaneCrenshaw5 күн бұрын
How can I do this with Vertex AI instead of Google AI?
@en_kratia5 күн бұрын
Use cookies() === bye bye SSG?
@abdulhadijafari77186 күн бұрын
Route Handlers in app router are confusing for me, I am not quite understanding what is it for. can you make videos on that
@henriquematias19866 күн бұрын
Regarding "Calling Route Handlers from Server Components" I think the idea here is that calling the function directly will mean that you end up with 1 function on the server component to call the data directly ( bypass API route ) and another one on React-Query ( or SWR ) to call the API and basically end up doing two different "getData" functions, one for server and one for client, which can up mismatched / confusing / harder to maintain ?
@paulhetherington38547 күн бұрын
Ex -- Oriental women only -- personal choice! port -- personnel - received daily orders - for that activity! Jap 7th fleet! I.e. US NAVY <<< Jap mask! Will be punished!
Dumb Question: With all these server actions, route handlers, etc. I'm confused with just one question: Can we use "useEffect" hook on client side to fetch data from an api like we used to do for SPAs in React?
@_rhythmsaha5 күн бұрын
First, it's important to understand Vercel's main business model. They have made Next.js free and open-source, not generating direct revenue from the library itself. Instead, their primary revenue stream comes from their hosting and serverless offerings. The recent updates to Next.js, emphasizing server components and fetching data directly from the server, are designed to encourage developers to utilize Vercel's hosting and serverless platform. By promoting this approach, Vercel aims to increase adoption of their paid services and generate more revenue from developers leveraging their CPU runtime and infrastructure. While the App Router in Next.js is a compelling feature, the default behavior of rendering components on the server raises concerns, particularly for small-scale applications. Server-side rendering can lead to inefficient use of CPU resources, as even simple components are rendered on the server, potentially resulting in increased costs and performance issues, especially for those on low-budget or free hosting plans. Personally, I prefer to separate concerns and utilize dedicated backend frameworks like Django or Express for API development, as they are more scalable and better suited for this purpose. Attempting to fetch data directly from the server using Next.js can introduce unnecessary complexity and latency, as the request must first reach the Vercel server, which then proxies or duplicates the request to the actual backend API before returning the response. This additional hop can lead to decreased performance. For applications with an existing backend API hosted elsewhere, I recommend leveraging client-side data fetching, as it streamlines the process and avoids the overhead of server-side data fetching through Vercel's infrastructure. However, it's crucial to ensure that the backend API is properly secured, regardless of the data fetching approach used.
@saumya84078 күн бұрын
The vercel V0 is incredible and it will save a lot of time on developing large and complex applications.
@TheAyushSomani9 күн бұрын
Since when Channing Tatum become a developer? btw loved the presentation, James.
@INTRPOLPolice9 күн бұрын
Awesome ❤🎉
@Racine1410 күн бұрын
Can you talk about hydration? Up to now, I am very confused about this error.
@nikb371313 күн бұрын
I spent 5 days and still couldn't figure out how to build a UI of catalog page for example. I have catalog data that I want to request directly from my db which make my page a server component. I also want to have filters on top of that page which are client component bc they need to use react hooks. So far I figured out how to do it by making all my page a client component and requesting my data via proxy router that requests data from my db. Is it correct approach or is there still a way to combine those two logics in one server component without using proxy router? In old pages routing I would do it with getServerSideProps, get my db data directly and then use filters in the jsx with all useStates I need and data as a props. But now it's all so confusing...
@timooothy123414 күн бұрын
Is it out to be used??
@Fargoth9514 күн бұрын
I still get a 404 not found in the website preview whenever I try to deploy. It's just an index.html and a folder of images. Anyone know what I'm doing wrong? I also added trying a vercel.json that another youtuber recommended but it didnt work.
@ajsimwork888714 күн бұрын
I don't understand where getData() is coming from for the first example, nor do I understand why localhost:3000/api brought up the data JSON data for him. There are many things that simply aren't explained here. My Next.js seemingly doesn't "work" like the one shown in the tutorial. Not helpful...
@GeniusHawlah14 күн бұрын
What about GET in a Client Component, can one still use server actions or route handler is recommended for GET? I tried using actions to fetch in a Client Component and it worked perfectly, but checking through my network tab, I realized it's sending a post request. I curiously checked the docs and using server actions to fetch was not talked about. Can you clarify that please? Thanks for great contents all the time!
15 күн бұрын
how does partial prerendering play with SEO? are the dynamic parts seen by the search engine crawlers?
@CodingBill16 күн бұрын
Great video, could you talk about layout components as well ? As far as i know the fetching and caching behavior is a bit different.
@dzienisz16 күн бұрын
She is the best!
@MichaelRoussel17 күн бұрын
6:11 I'm pretty sure he said "I just want some pussy"
@pamphilemkp17 күн бұрын
great one, I picked big commerce with nextjs 14 over the remaining vercel platforms, because for some reasons it has almost everything built allowing us (developers) to create faster e-commerce projects for example there are many options for checking out after adding to cart, the client can pick a payment method such us cash on delivery, online payment and so one, I tried Shopify before but I think as for many developers Big Commerce is the best option. big up to Big Commerce.
@hollycow817117 күн бұрын
hi how can i use Country Restriction in Next.js? Does Vercel provide any inbuilt solution?
@vatansrivastava727918 күн бұрын
Need a tutorial on this
@farzadali743418 күн бұрын
Excellent delivery!
@leeanucha18 күн бұрын
The fact that google calls it core web vitals is hilarious. it's a joke
@brennang0219 күн бұрын
When your seeing the cache hit at 06:30 is that in a development mode. All i seem to get is Cache missed reason: (auto cache) and i cannot work out why.
@seuntaiwo873520 күн бұрын
I don't seem to get the first point. can anyone explain?
@SashankAryal21 күн бұрын
So I can use sever actions for data fetching? The docs are not clear on that.
@syedazeemjaved21 күн бұрын
Great job in the first part of the video to highlight that caching does not work (as usual) when we are on a dev server, I remember that this got me scratching heads for quite sometime when I started with the App Router.
@Skillthrive22 күн бұрын
Revalidating data in try/catch still gets me. 🥴
@Steve-nd2wj23 күн бұрын
Can anyone know why he doesn't use `useEffect()` when he fetches from an API? I thought it's common practice to use it so you don't get unexpected behavior?
@JShunk23 күн бұрын
If I have a website that can pull and push data from a MongoDB server and another separate website that just pulls the data from the server how do I get the second website to update during production and know that new data has been added? It works great on a development server cause there is not caching but my only option right now is to rebuild and push the production app everytime the database is modified to get the most up to date information because without it I can see it just hits nextjs-cache that never updates. It is so frustruitng cause there is not way to even add a way to refresh the cache every hour or something.
@JShunk23 күн бұрын
Here is what the API looks like atm: export const GET = async (req: Request, res: NextResponse) => { try { await connectDB(); const post = await prisma.post.findMany(); return NextResponse.json({message: "Data fetched successfully", post}, {status: 200}) } catch (err) { return NextResponse.json({message: "Error fetching data", err}, {status: 500}) } finally{ await disconnectDB(); } };
@BrandonClapp25 күн бұрын
Have to use a webhook to invalidate the cache so that my database query executes and returns new data when an external source updates my data? Wow how did something so simple get so complex? Defaulting to static pre-rendering even though my server component had a db query in it was really surprising. At least with getServerSideProps and getStaticProps you knew how your page was going to be built, I would like more control over how pages get rendered and have it decoupled from the caching mechanism. Forcing this caching in app router adds so much more complexity and makes simple things like issuing a db query way more complicated than they need to be. Caching needs to be an opt-in feature instead of something that requires using an unstable API to bypass.
@rmo61326 күн бұрын
Thanks so much for this great tutorial Simple, clear and concise! Looking forward to seeing a sequel where you integrate reading from docs
@kewlking27 күн бұрын
I need glasses
@joshuarain980227 күн бұрын
After I deploy successfully, it says 404: NOT_FOUND, it does see the HTML file, please help : (
@Denice.6720 күн бұрын
i also need help regarding this please
@Fargoth9514 күн бұрын
you ever figure it out?
@Denice.6713 күн бұрын
@@Fargoth95 no bro still stuck
@AngeloCarlotto27 күн бұрын
Lydia @theavocoder is the best
@bun_bon_bon_120427 күн бұрын
thank you so much
@InternetTips_bb28 күн бұрын
The development of NextJs is just super confusing. Seeing a video like this makes it super clear. It's just a lot of "we've added some custom magic here, ah and this part is also just some custom magic, ah and this part is custom magic ...". I've been doing react for years and I have to watch and read everything 5x before things start to make sense. What's the big win to be had by adding all this complexity? Marginally more control compared to the 'pages' router? I really applaud everyone who is trying to make sense of all this complexity ... I'm just shaking my head over this ...
@appscastle29 күн бұрын
This guy should keep posting videos, the examples and the way he explain things are just amazing