 Hi, this is Christian. So in this video, I'm going to show you how to install the react route of DOM version six Okay, it's quite a little bit different from a version five Not that different, but the syntax is a little bit different just go down here I put some notes again to compare the two here So the difference is that you have an element property that you will sign that with the route The child component as opposed to wrapping the component inside the route tags Okay, so let's go do that right now in the IE So I have the previous example we have using version five. So we need to Really just overwrite this version 5.3. You can uninstall it and if we install again, or you could just install over it So you just do that. I'm gonna uninstall just in case and uninstall the react Router DOM. Okay, so just do that. It should be move the react Router DOM library Okay, so you can see the now it's gone, right? It's nothing here anymore and then now we're gonna go in install the version six so npm install React Router DOM and you just leave you like that. So you will grab the latest version which is version six point something and It should reflect that and the JSON package file Okay, so here we go six point one point zero Okay, so I'm gonna turn this off and I did not change my code in here because this is based on the version five All right, so if I go back to my terminal and run my script It should not work. It should throw a bunch of errors. We try to navigate to those links Okay, so here we go. You see that the switch is not exported in react Router DOM already So the abjx file. Okay, so we need to fix those. So therefore in here I'll leave this running and we just basically we remove the switch and replace it with the Routes plural, right? And I don't need to actually I don't need it here, right? Really We did that in your index file. So then I replace the switch with routes Oops, and then I close it down here with routes Okay, and then if I say that go back to the browser and you see which issues don't not work as you can see It says element type is valid The route component, right? It's not it's something something so a bunch of errors and we're gonna fix that by doing this way So instead of embedding the tag inside the route tag here. You have to include in here the element Property it's equal to a curly brace. It's an object. Okay, so this whole route here must be inside this curly brace like this Right, and then we need to close this tag so you can do that Okay, notice here and I close that and it has an auto tag You could leave it as is you could also just leave it out And then you can do this the slash and then close that you so you don't need this ending tank here How we do that's fine Okay, so I'm gonna copy this make it really quick copy that and then paste it right in here So a little bit messy here But as long as you put in the right tag Okay, you should be okay Right, so make sure you close that tag properly and No error marks in here So we're gonna go and save that and go back to the browser again And so you see everything comes back just like before. Okay, so now we are now using version six I also recommend that you Will you do the edit flight like this you passing data over to the component? You need to retrieve it from the URL so I recommend that you use a Function component as opposed to a class component. Okay, so using a function component you will have access to this hooks called use params and you can extract the ID directly from the URL using this Function here. Okay, so it's such easier if you see a class component you have to do a little bit more in this So if you're using a class, just make sure you watch my Read over my notes on the blackboard and how to do that. Otherwise, it's all you need to do for your route using version six