React Router in Depth #9 - Making Breadcrumbs (useLocation hook)

  Рет қаралды 56,276

Net Ninja

Net Ninja

Күн бұрын

Пікірлер: 46
@MentorAliu
@MentorAliu Жыл бұрын
just a tip, when you filter an array and want to remove all falsy values which in this case empty string is false, you can do this .filter(Boolean)
@aytachchakif6327
@aytachchakif6327 Жыл бұрын
Thanks Shaun for sharing these tutorials with us, i really appreciate them. You are our brother from another mother 🍻
@Mognatti
@Mognatti Жыл бұрын
way easier than I thought that would be. nice job!
@nganji7932
@nganji7932 10 ай бұрын
You really teach so well and so clear! Thank you
@NetNinja
@NetNinja 10 ай бұрын
You are so welcome! :) thanks for watching
@adarshkhatri993
@adarshkhatri993 Жыл бұрын
Your videos are pretty explanatory and helpful in real world example.. Thnx for making this video...😊
@NetNinja
@NetNinja Жыл бұрын
Most welcome 😊
@rockbelleh6237
@rockbelleh6237 2 жыл бұрын
My mentor n teacher tnks alot ur channel has reli impacted my life.please continue the good work.God bless n up lift you continually.Amen 🤗🤗
@NetNinja
@NetNinja 2 жыл бұрын
It's my pleasure :) thank you for the kind words!
@Hacking-NASSA-with-HTML
@Hacking-NASSA-with-HTML 2 жыл бұрын
Thank you so much, sir, for all of your efforts and awesome work 🤝👍
@NetNinja
@NetNinja 2 жыл бұрын
You're very welcome :) thanks for watching!
@arturoordonez-hernandez8750
@arturoordonez-hernandez8750 Жыл бұрын
Thanks! This was very helpful (as are a lot of your videos). For what I'm doing, I had to end up adding an array prop to my Breadcrumbs component so some Breadcrumbs just display as text since their links just go to a blank page (they refer to a component dependent on parameters that sometimes doesn't exist).
@akhilgannu3239
@akhilgannu3239 Жыл бұрын
How can we change the name of the crumb because the name is coming from the url itself but want to have a different name
@khangmach01
@khangmach01 Жыл бұрын
Thank you for your videos. It helps me alot
@NetNinja
@NetNinja Жыл бұрын
That's awesome to hear :) thanks for watching Khang!
@miloman1995s
@miloman1995s Жыл бұрын
you save my life, thank you mate
@NetNinja
@NetNinja Жыл бұрын
@g10-you
@g10-you Жыл бұрын
always excellent. Thank you so much.
@NetNinja
@NetNinja Жыл бұрын
Thanks for your support :)
@ahoymatey1234
@ahoymatey1234 2 жыл бұрын
another great tutorial series!
@NetNinja
@NetNinja 2 жыл бұрын
Thanks Andrew!
@zachariayussuf7652
@zachariayussuf7652 Жыл бұрын
Love your content . Great work as always . I have one question though . Why didn't you use useState to hold the currentLink state, Isn't that what react is all about(not mutating variables(values) directly) ? Sorry English isn't my first language. I really love your content . You are gifted when it comes to making complex things easy for everybody .
@SarirkKarim
@SarirkKarim Жыл бұрын
shaun sir if i try to print title in breadcrumbs that prints the encoded url how could I just print the text from url?
@Venthyrus
@Venthyrus Жыл бұрын
it's an amazing content, I hope one day I can be as successful as you.
@silky2282
@silky2282 2 жыл бұрын
hi shaun! i just wanted to ask you if there will be any new next js 13 course
@radosawweidemann4944
@radosawweidemann4944 2 жыл бұрын
there should be += and I see =+. I see it's working you but me working only second option
@paulinapiatek8406
@paulinapiatek8406 Жыл бұрын
Awesome work! 👍
@NetNinja
@NetNinja Жыл бұрын
Thank you Paulina! 👍
@omarr03
@omarr03 Жыл бұрын
how can I access objects of json server using slugs?
@bikramchettri9405
@bikramchettri9405 2 жыл бұрын
Can we do go back?
@ibrahimshaheen8572
@ibrahimshaheen8572 2 жыл бұрын
dear there is one problem on links for example if we in help page then click on contact us the breadcrumbs will bet help > contact if we click at contact at the breadcrumb component it will direct to 404 page and the url will be helpcontact
@vladislavgorovenko
@vladislavgorovenko Жыл бұрын
export default function Breadcrumbs() { const location = useLocation(); const currentLink = location.pathname .split("/") .filter((item) => item != "") .map((item, index, array) => ( {item} {index === array.length - 1 ? " " : " - "} )); return {currentLink}; }
@vladislavgorovenko
@vladislavgorovenko Жыл бұрын
That's how I solved it 👆🏻Just ignore tags, since I used Chakra UI
@kevinnp6467
@kevinnp6467 11 ай бұрын
Makin camuh asli
@viewvue3744
@viewvue3744 2 жыл бұрын
can i ask you: what is differences between navlink and link in react router ? thank a lot
@frogGames
@frogGames 2 жыл бұрын
navlink will just add an active className to the current link that is clicked otherwise they are the same
@anmastery
@anmastery Жыл бұрын
navlink give you active class is usefull if you want add some conditional and Link just like a href also not give active class
@annametel8627
@annametel8627 Жыл бұрын
Thank you ❤👍
@NetNinja
@NetNinja Жыл бұрын
You're welcome 😊
@rfryanfavour4369
@rfryanfavour4369 Жыл бұрын
I've told my friends 👥️️👥️️ b4 but ill say it again. If you weren't a developer a lot of people won't stay developers cause theres no one to hold their hands🤷🏿‍♂️
@ianiketjain
@ianiketjain Жыл бұрын
Lovely ❤
@mohamedyoussef8835
@mohamedyoussef8835 2 жыл бұрын
Awesome video +++++++++++ 😀
@prashantpatel6334
@prashantpatel6334 Жыл бұрын
Not working for me
@steftrando
@steftrando 6 ай бұрын
Ok this is good but definitely wouldn’t do this in production. Each segment of the path needs both a URL and a title, since you wouldn’t make the url title the url itself but something more styled. For example you wouldn’t use the url flight-tickets you would make it Flight Tickets. Where would you get that data from? Each layer will have a different source of data
@michalnowak2181
@michalnowak2181 Жыл бұрын
thx
React Router in Depth #10 - Forms & Actions
11:17
Net Ninja
Рет қаралды 36 М.
React & Material UI #22: Breadcrumb & Breadcrumb + React Router
25:50
Anthony Sistilli
Рет қаралды 36 М.
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
React Router in Depth #8 - Error Elements
9:03
Net Ninja
Рет қаралды 29 М.
React Material UI Tutorial - 24 - Breadcrumbs
6:05
Codevolution
Рет қаралды 29 М.
Junior vs Senior React Folder Structure - How To Organize React Projects
16:16
React Router in Depth #4 - Nested Routes & Layouts
11:22
Net Ninja
Рет қаралды 79 М.
Create BreadCrumbs Component using Ant Design in React JS
15:55
CodeWithVishal
Рет қаралды 7 М.
#61. React-Router Hooks || Complete guide to useLocation hook..
6:46
React Router in Depth #6 - Loaders
12:07
Net Ninja
Рет қаралды 62 М.