React Router in Depth #7 - Route Parameters

  Рет қаралды 41,364

Net Ninja

Net Ninja

Күн бұрын

Пікірлер
@maskman4821
@maskman4821 2 жыл бұрын
One thing very important Shaun forgot to mention is that there is naming convention in loader function, for example, if the route name is Career, the loader function name has be careerLoader() in camel case.
@Simon-wi7vr
@Simon-wi7vr Жыл бұрын
Thank you! Does this mean each component can only have one loader? What if you want to load multiple data types into a single component?
@omoleyeosadare5775
@omoleyeosadare5775 10 ай бұрын
@@Simon-wi7vr it is stated in the react-router doc that each component to it own loader function
@andromilk2634
@andromilk2634 8 ай бұрын
So it would not work if the convention is not respected? Or it's just a question of style? Thanks
@iLoveToLearn247
@iLoveToLearn247 Жыл бұрын
Always saving lives with your great way of teaching. Thanks Shaun
@josegkurszewski8363
@josegkurszewski8363 Жыл бұрын
Wow, you are the man!! This course is what I needed to fully understand React Router DOM. Perfectly explained. Thank you very much. I really appreciate the time you put into creating these videos. Thanks for sharing this valuable content. 😊
@rockbelleh6237
@rockbelleh6237 2 жыл бұрын
Wow..my mentor i miss ur teaching tnks alot for this. U r gifted 😍😍😍
@NetNinja
@NetNinja 2 жыл бұрын
It's my pleasure
@darkooo94
@darkooo94 2 жыл бұрын
If I understand correctly, we actually don't need useParams hook in the CareerDetails function after we setup the loader and get the variables through useLoaderData hook, right?
@hybs9473
@hybs9473 Жыл бұрын
Question, why there's not a need to map the career that was fetched on the careerDetails.jsx?
@chinmayghule8272
@chinmayghule8272 Жыл бұрын
@@hybs9473 The response only had a single person object.
@ichiroutakashima4503
@ichiroutakashima4503 Жыл бұрын
@@hybs9473 exactly as what chin said. Basically, you selected an item, and that item is one object. Apart from the original list which is an array of objects.
@reneehani434
@reneehani434 Жыл бұрын
same question and I deleted and still works fine ...
@Ahmed-fq3kz
@Ahmed-fq3kz Жыл бұрын
Yes, useParams and useLoaderData works dependently
@kholaseerat2385
@kholaseerat2385 5 ай бұрын
Great and easy explanation. To the point love it thanku so much
@NetNinja
@NetNinja 5 ай бұрын
Most welcome 😊 thanks for watching!
@ivan4486
@ivan4486 Жыл бұрын
Great course! Thank you! I wonder how to show a preloader while data is being fetched.
@souviknag
@souviknag Жыл бұрын
You just saved the day! Thanks a ton. Liked and subscribed
@NetNinja
@NetNinja Жыл бұрын
Glad it helped :) thanks for subscribing!
@souviknag
@souviknag Жыл бұрын
@@NetNinja Since you have replied, do you have any course on UDemy or any other platform? Where I can learn more may be?
@elvisadesese2842
@elvisadesese2842 Жыл бұрын
I need a career change to get career change. That is why I am following this channel
@NetNinja
@NetNinja Жыл бұрын
Awesome, welcome aboard and best of luck on your journey Elvis! :)
@sabril.m8248
@sabril.m8248 Жыл бұрын
thank u man im very greatful with this tuto
@ahmedserifoski5999
@ahmedserifoski5999 Жыл бұрын
you are THEE MAN !!!!!!!! 🔥🔥🔥
@NetNinja
@NetNinja Жыл бұрын
Thanks Ahmed!
@cartermah5165
@cartermah5165 Жыл бұрын
Following through this tutorial now and am not getting the right element in the array from the API? Eg: Going to careers/3 ends up showing me the 4th career in the array instead of the 3rd career- which is the one that has id 3. Any ideas?
@jacobhagan553
@jacobhagan553 Жыл бұрын
Please values are missing in careerDetails component when i select a career item. Could you please help?
@arazhamid
@arazhamid Жыл бұрын
I appreciate it 👏,so Why does it give an error when I use career.name instead of career.id?
@bipulkushwaha1567
@bipulkushwaha1567 7 ай бұрын
Next Level, Just Great.
@NetNinja
@NetNinja 7 ай бұрын
Awesome, thanks! :)
@Sameh_ElGazar
@Sameh_ElGazar Жыл бұрын
can someone explain the careerDetailsLoader func (passing the params obj to it) 05:00
@omoleyeosadare5775
@omoleyeosadare5775 10 ай бұрын
This ":id" is called dynamic url. careerDetailsLoader it helps us in loading data into a component before it render unlike useEffect(). in this case to associate each career to it's dynamic url, we need to call params object as an argument to the careerDetailsLoader so that when we go to a certain path=":id" on or browser we would get the corresponding career.
@yourSOULismy
@yourSOULismy 2 жыл бұрын
Why you added toString() for career.id in the Link? It works without this. I checked in console.log and it return just a number without convert. It matter in url that you use string id than number id? in CareersDetails you left id with useParams but it's not used in this file. Is it required for something?
@chinmayghule8272
@chinmayghule8272 Жыл бұрын
JavaScript coerces types implicitly. If a string is being concatenated to a number, then the number will be implicitly coerced into a string and then both the strings will be concatenated.
@ichiroutakashima4503
@ichiroutakashima4503 Жыл бұрын
Unless you're using typescript. Link's "to" property actually needs to read a string, hence conversion is needed.
@orangeblossom9968
@orangeblossom9968 Жыл бұрын
but doesn't interpolation make its content a string automatically?
@ALotThx
@ALotThx 11 ай бұрын
Thanks for this great video!
@NetNinja
@NetNinja 11 ай бұрын
Thanks for watching! :)
@stefanmasic1287
@stefanmasic1287 Жыл бұрын
Hi. I used instead of "id" different field name (numofpage or stevilkastrani in our language). Nothing works. Then I change model in db.json (field name) and also fields in .js (App, CareerDetail). And YES, everything works. You stated that we can use any parameter name (for example "abc"), but just don't work. About video: GREAT! Best regards, Štefan.
@LonBorey
@LonBorey Жыл бұрын
How do we use JSON-server when we deploy the project to the hosting server?
@arjunrajeev469
@arjunrajeev469 Жыл бұрын
I believe json-server is only used to mimic a real-world REST API which returns a JSON response. In reality, you will substitute the localhost:4000 URL with your API endpoint URL.
@qiuzhi99
@qiuzhi99 2 жыл бұрын
using antd pro?
@philippe4368
@philippe4368 Жыл бұрын
How I can pass the entire object as parameter, instead only ID? That way I would not need to fetch API again if I have already the data.
@omoleyeosadare5775
@omoleyeosadare5775 10 ай бұрын
Read the react-router docs. your are suppose to give each component it's own loader function
@catalinbanici3357
@catalinbanici3357 Жыл бұрын
Can I get a single object from an array of objects without fetch and loader functions?
@ajaykumbhar6919
@ajaykumbhar6919 6 ай бұрын
Use fetch and loader function in the parent component and pass each object as a prop in the desired component
@GethushanRavichandran
@GethushanRavichandran 2 жыл бұрын
Please create a Playlist about "Creating E-Commerce Website using Strapi , MongoDB, React , and Stripe"
@mohamedyoussef8835
@mohamedyoussef8835 2 жыл бұрын
Awesome video +++++++++++ 😀
@xanny9849
@xanny9849 2 жыл бұрын
when will be next lessons uploaded?
@NetNinja
@NetNinja 2 жыл бұрын
I'll be uploading again daily from Boxing day (26th) :).
@benyamin4634
@benyamin4634 2 жыл бұрын
awesome thanks
@Ahmed-fq3kz
@Ahmed-fq3kz Жыл бұрын
Awesome
@marianaangel5338
@marianaangel5338 2 жыл бұрын
I am the first to watch it!
@marianaangel5338
@marianaangel5338 2 жыл бұрын
Could you please make us a playlist of Nextjs integrated with Redux?
@michalnowak2181
@michalnowak2181 Жыл бұрын
thx
@muhammadfahad9330
@muhammadfahad9330 2 жыл бұрын
sir I love the way You teach i just wanted To ask That i Am currently Learning Flutter From your youtube channel. First i have to learn Flutter For Beginners playlist and than Flutter with Firebase Right? These 2 Playlists are enough To learn Flutter? kindly Ans I have texted You on Instagaram as well but u didn’t respond ? waiting Kindly tell me the roadmap of Learning Flutter
@maskman4821
@maskman4821 2 жыл бұрын
You can learn it from chatGPT, It is good especially in coding and programming, just ask any question and you will get the desired answers you need and want 😘
React Router in Depth #8 - Error Elements
9:03
Net Ninja
Рет қаралды 29 М.
React Router in Depth #6 - Loaders
12:07
Net Ninja
Рет қаралды 62 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Learn React Router v6 In 45 Minutes
46:20
Web Dev Simplified
Рет қаралды 577 М.
URL Params as State in React (Complete Tutorial)
20:33
Cosden Solutions
Рет қаралды 19 М.
React Router in Depth #4 - Nested Routes & Layouts
11:22
Net Ninja
Рет қаралды 79 М.
React Router Tutorial - 10 - Dynamic Routes
9:26
Codevolution
Рет қаралды 99 М.
React Router - Complete Tutorial
23:53
Cosden Solutions
Рет қаралды 156 М.
React Router in Depth #10 - Forms & Actions
11:17
Net Ninja
Рет қаралды 36 М.
Get started with React.js & React Router 6+
3:45:30
Academind
Рет қаралды 199 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН