Next JS tutorial in Hindi #13 Catch-all Segments of Route in Next.js

preview_player
Показать описание

In this next js tutorial video, we learn about common layout in next js 13.4 in Hindi. this course is made by Anil Sidhu in the Hindi language.
points of video

What are the Segments of the Route?
How to get all segments of Route
Interview Question.
The task for you.
Get Route Name from url?
How to get all segments of Route?

Рекомендации по теме
Комментарии
Автор

gr8 job,
no need of "use client", it works without of it.

kashifniazi
Автор

Here is 2 way to use map function to take all data.
1)
<h1>Lectures:</h1>
<ul>
{params.lecture.map((segment, index) => (
<>
<li key={index}>{segment}</li>
</>
))}
</ul>

2) let URL = params.lecture.map((segment, index) => (
<>
<li key={index}>{segment}</li>
</>
))
const joinedString = params.study.join('/');

<div>{joinedString}</div>

oufwilm
Автор

learning from you best teacher love from nepal

sagarregmi-ltpj
Автор

Very helpful video.
But please upgrade your mic quality 🎤 like chai aur code😇

samiransari-fgkx
Автор

its very helpful for who watching old playlist code

kplcreation
Автор

I only let you know that there is no need of using 'use client' for the dynamic routing and using params, it works on server side too but why it does not console anything because when it is being used on server side, it console everything on server side, in our case that is terminal, when we console on client side, it is consoled on browser.

muhammadanwarsubhani
Автор

we can fetch data dynamicaly like

without using array [ ] thats all

akutubeworld
Автор

slam sir
what will you make a project in Next JS after complete the playlist videos please gave answer

goldentalks
Автор

by using foreach loop we can use all segments

kamranbhatti
Автор

2 segment ke bad agr access krna hai to ek to static tareeka hai jese apne kiya hai {lecture[0]} like {lecture[3]}, {lecture[4]} etc
Ya fir hum map ka use kr sakte hai or map ki help se jitne bhi segments aane wale hai unko dynamically show krwa sakte hai, Correct?

prempanwar
Автор

By this you can display multiple level of sagments.

const { comments } = params;

{comments.map((comment, index) => (
<h2 key={index}>
Level: {comment}
</h2>
))}

konnectwithahsan
Автор

I am getting type error here

TypeError: Cannot read properties of undefined ( reading '0')

ufmjwho
Автор

bhai mera params ki jgh kuch or likh kr nhi chlta, vo undefined rehta hai variable jo bhi likhu me params ki jgh

gursimranjitsingh
Автор

sir kitni baki hai video abhi q ki me abhi project pr hu live to meko smjh nhi aa rha hai

zuosnnr
Автор

What's the use of this part 🧐🧐 if we don't want to show more than what have we created. And some how it is just returning our own keywords 😒

shailmoktan