Next.js 14 Tutorial - 17 - Routing Metadata

  Рет қаралды 67,103

Codevolution

Codevolution

8 ай бұрын

📘 Frontend Interview Course - learn.codevolution.dev/
💖 Support UPI - support.codevolution.dev/
💖 Support Paypal - www.paypal.me/Codevolution
💾 Github - github.com/gopinav
📱 Follow Codevolution
+ Twitter - / codevolutionweb
+ Facebook - / codevolutionweb
📫 Business - codevolution.business@gmail.com
Next.js 14
Next.js Tutorial
Next.js 14 Tutorial
Next.js Tutorial for Beginners
Routing Metadata SEO
Routing Metadata

Пікірлер: 47
@kenkioqqo
@kenkioqqo 3 ай бұрын
This is not a tutorial series. It's the best NextJS Documentation demystification series for engineers who want to learn it fast.
@charleskangwa1629
@charleskangwa1629 2 ай бұрын
Got me going back to back😂 , Greatest beginner series
@faizanahmed9304
@faizanahmed9304 8 ай бұрын
Hey Vishwas, hope you are doing good. Please continue these series.
@lucateea
@lucateea 6 күн бұрын
If it doesn't update correctly, in base layout, remove tag in html, otherwise it will be duplicated, Next will automatically derive title from metadata defined above
@auricaputri7664
@auricaputri7664 25 күн бұрын
Great Video and amazing explanation, good job
@riyad-appscode
@riyad-appscode 8 ай бұрын
Great video 👍
@cuneytdonmez214
@cuneytdonmez214 6 ай бұрын
thank you fot best learn
@nicolasbonilla2155
@nicolasbonilla2155 5 ай бұрын
This works only SSR component, rigth?
@dhani__el
@dhani__el 27 күн бұрын
The Metadata import is a type import which is only used by typescript in type checking, so therefore should be imported as >> import { type Metadata } from "next";
@iroosevelt
@iroosevelt 3 ай бұрын
For a specific route, I want to use a custom layout instead of the parent layout. How can this be implemented?
@shashankkumar1633
@shashankkumar1633 5 ай бұрын
please also make video on how to accept payment in nextjs. like if owner is selling some course, pdf, how to accept its payment and how user will receive the pdf either on the itself or on their registered mail
@gncastro1
@gncastro1 8 ай бұрын
Great video. Is possible to use dinamic routing metadata not in type script? but in a jsx enviorement? I tryed the code here, but it does not worked ... Thankssss
@sharpesthawk
@sharpesthawk 7 ай бұрын
Make sure to remove the line "use client" for this to work. I Simply did this and it worked for me. export const generateMetadata = ({params}) => { return { title: `Product ${params.productId}` } }
@prafulkatlana3439
@prafulkatlana3439 5 ай бұрын
How generateMetaData method call?
@michaeleva5598
@michaeleva5598 4 ай бұрын
Thank you for this series! Just a quick question, what's the difference between using an async function to get metadata vs a normal function?
@ognjennedic5388
@ognjennedic5388 3 ай бұрын
You would use async function to wait for data to load. In this example, for simplification, it was not used that way, but you would resolve the API call in new Promise part
@ExtraTurtle
@ExtraTurtle 4 ай бұрын
If I want my page to be titled "product ${nameOfProduct}" and not product "${productIndex}" It means I need to fetch the product in both "generateMetadata" and in "ProductDetails" component? how can I fetch it only once?
@hoanghai6690
@hoanghai6690 2 ай бұрын
same question here
@xdmemeguy
@xdmemeguy 5 ай бұрын
A question here: If i want to pass a product id and fetch product details from and api such as (name, description, quantity, price etc) Now i want to display title of page as "Sunshine cooking oil" which is the name of my product For that what will be the ideal way of displaying title of page? I know you just showed the solution for that, but when i'll fetch my product again within the component won't that make 2 calls for the same detail?
@hoanghai6690
@hoanghai6690 2 ай бұрын
I have the same question, waiting the answer...
@sauravbhagat4737
@sauravbhagat4737 Ай бұрын
The key is "generateMetadata" function runs on the server side. So this question will have different answers for server side component and client side component. 1. server side component Use getServersideprops to get the product details and that will come as a prop to the component, so directly export the static metadata object. 2. client side component We can use something like react auery to use the caching strategy for this case or can use state variable/context/redux etc. Hope this helps.
@user-ly9vg7bp6l
@user-ly9vg7bp6l 6 күн бұрын
Why is `generateMetadata` defined as an arrow function while `ProductDetails` is defined as a normal function?
@eddiehou513
@eddiehou513 4 ай бұрын
Hey Codevolution, love the series - really helping to get a grasp on Nextjs. I'm confused on why the return type of the generateMetadata function was changed to Promise of Metadata. My understanding is that In the async function, we are awaiting for the promise to resolve before returning the Metadata. The await on the timeout promise returns a string for title and then the outer function returns with Metadata. Please let me know what I'm missing.
@hoanghai6690
@hoanghai6690 2 ай бұрын
async function always return Promise, you missed the basic fundamental of Javascript.
@eelguneezmemmedov1671
@eelguneezmemmedov1671 7 ай бұрын
sir please Can u make small project based on multilanguage page with next js Pleaseeee
@nishthaarora1907
@nishthaarora1907 4 ай бұрын
can anyone share the dynamic metadata code in js
@najorg2023
@najorg2023 7 ай бұрын
6:26 Why using a SetTimeout ? When i increase it like 10 Secs, the whole code getting blocked for 10 seconds !! Will it impact PageSpeed Score ? if we ignore that setTimeout any negative effect on code ? Kindly please explain either vishwas or any expert please !!! THANK YOU SO MUCH FOR THESE SIMPLEST NEXT TUTORIAL
@ludsonpereiradossantos5505
@ludsonpereiradossantos5505 7 ай бұрын
I'm not an expert. But I believe he did this just to simulate an API call, which would normally happen asynchronously and you would receive the id to be displayed with the product information.
@najorg2023
@najorg2023 7 ай бұрын
@@ludsonpereiradossantos5505 okay
@justtil6749
@justtil6749 4 ай бұрын
Its just to simulate an API call
@user-mg3jx2uv4k
@user-mg3jx2uv4k 3 ай бұрын
Hi, Ia m not able to dynamically change my title. I am using "next": "14.1.4". Can anyone help me. I am going through the same video of adding dynamic title
@LillyK-ro2nh
@LillyK-ro2nh 3 ай бұрын
If you are using generateMetadata and it's not working - please check the spelling or make g as small if it's capital in generateMetadata.
@LillyK-ro2nh
@LillyK-ro2nh 3 ай бұрын
or share your code, I will try to help you if it's not resolved yet
@naimmomin5811
@naimmomin5811 2 ай бұрын
can someone tell me what button he pressed to auto complete at 4:47?
@hooman_talakian
@hooman_talakian 11 күн бұрын
windows: ctrl + space mac: fn + ctrl + space
@rashmikaabeyrathna9397
@rashmikaabeyrathna9397 2 ай бұрын
if your code doesn't change title metadata, check the function name generateMetadata. if your spellings are correct, if not going to work. export const generateMetadata = ({params} : Props) : Metadata => { console.log("metadata") return { title : `Product id ${params.productId}`, }; };
@clnia_dev
@clnia_dev 16 күн бұрын
you helped me here! thank you
@profile-51432
@profile-51432 8 ай бұрын
👍
@prakharsoni3495
@prakharsoni3495 18 күн бұрын
but same thing how to do in javascript jsx
@rishiraj2548
@rishiraj2548 8 ай бұрын
👍🙏
@devbenshort
@devbenshort 5 ай бұрын
I tried this but is not working ``import type { Metadata } from "next"; interface Props { params : {blogId:string; showcaseId:string} } export const generateMetData = async ({params}: Props) : Promise => { const title = await new Promise(resolve => { setTimeout(() => { resolve(`Showcase - ${params.showcaseId}`); }, 100) }) return{ title: `Product ${title}`, // This will be the page title for this specific blog post } } const ShowcaseDetails = ({params}: Props) => { return Showcase Details {params.showcaseId} and blog post {params.blogId}; } export default ShowcaseDetails;``
@LordJureth
@LordJureth 4 ай бұрын
casing on the const name, lowercase D in data. generateMetadata()
@paulynewambui4744
@paulynewambui4744 5 ай бұрын
amazing, but I wish you explained it in detail
@user-yv1km8zu4j
@user-yv1km8zu4j 8 ай бұрын
20 November 2023 Monday
@Youtubeai2001
@Youtubeai2001 8 ай бұрын
😂
@eeewwwee
@eeewwwee 5 ай бұрын
河南捞翔中不中
Next.js 14 Tutorial - 18 - title Metadata
4:20
Codevolution
Рет қаралды 54 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 195 М.
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 20 МЛН
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 13 МЛН
the most important Next.js features to learn (in 8 minutes)
8:26
Web Dev Cody
Рет қаралды 32 М.
NextJS Parallel Routes Explained with a Simple Example
14:04
Dave Gray
Рет қаралды 9 М.
Crowdstruck (Windows Outage) - Computerphile
14:42
Computerphile
Рет қаралды 119 М.
Fetching Data Doesn't Get Better Than This
6:58
Josh tried coding
Рет қаралды 98 М.
Next.js 14 Tutorial - 19 - Link Component Navigation
7:24
Codevolution
Рет қаралды 66 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 556 М.
What is a REST API?
9:12
IBM Technology
Рет қаралды 1,5 МЛН
Next.js 15 Ruins Caching Even More
13:56
Web Dev Simplified
Рет қаралды 40 М.
My opinion on Angular 18 & React 19
9:47
Maximilian Schwarzmüller
Рет қаралды 52 М.
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 20 МЛН