No video

Django & React Tutorial #4 - React Router and Building Components

This django and react tutorial covers how to use react router and render different pages based on a url endpoint. You will learn how to use react router, how to perform page redirects and how to use the history prop involved with react router.
💻 AlgoExpert is the coding interview prep platform that I used to ace my Microsoft and Shopify interviews. Check it out and get a discount on the platform using the code "techwithtim" algoexpert.io/...
📝 Series Code: github.com/tec...
⭐️ Timestamps ⭐️
Addressing Some Concerns | 00:00
Tutorial #4 | 03:17
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: tech-with-tim....
👕 Merchandise: teespring.com/...
🔗 Social Medias 🔗
📸 Instagram: / tech_with_tim
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
🌎 Website: techwithtim.net
📂 GitHub: github.com/tec...
🔊 Podcast: anchor.fm/tech...
🎬 My KZread Gear 🎬
🎥 Main Camera (EOS Canon 90D): amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): amzn.to/2Yuol5r
🕹 Tripod: amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): amzn.to/3oi0v8Z
☀️ Lights: amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): amzn.to/2B2IXcQ
📢 Speaker (Beats Pill): amzn.to/2XYc5ef
🎧 Headphones (Bose Quiet Comfort 35): amzn.to/2MWbl3e
🌞 Lamp (BenQ E-reading Lamp): amzn.to/3e0UCr8
🌞 Secondary Lamp (BenQ Screenbar Plus): amzn.to/30Dtafi
💻 Monitor (BenQ EX2780Q): amzn.to/2HsmUPZ
💻 Monitor (LG Ultrawide 34WN750): amzn.to/3dSD7tS
🎙 Mic Boom Arm (Rode PSA 1): amzn.to/30EZw9m
🎚 Audio Interface (Focusrite Scarlet 4i4): amzn.to/2TjXsih
💸 Donations 💸
💵 One-Time Donations: www.paypal.com...
💰 Patreon: / techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
- Tech With Tim
- Django and React
- React and Django Tutorial
- React Router
- React Components
- React Router Tutorial
- Django
- React
⭐️ Hashtags ⭐️
#Django #React #JavaScript

Пікірлер: 362

  • @readcoderepeat
    @readcoderepeat9 ай бұрын

    Hey, great tutorial! For those using react-router-dom v6, the API has changed a bit. Took me quite a bit to nail it down lol. 1. The switch has been replaced with Routes. 2. Components for routes are now passed through the element prop. 3. The exact prop is no longer needed as routes match exactly by default in v6. Here's how you'd update the code: import React, { Component } from "react"; import RoomJoinPage from "./RoomJoinPage"; import CreateRoomPage from "./CreateRoomPage"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; export default class HomePage extends Component { constructor(props) { super(props); } render() { return ( ); } } Hope this helps! 👍

  • @johnkinyanjui2435

    @johnkinyanjui2435

    8 ай бұрын

    i did the same as you but on the browser its just a white blank page. then i used this and it worked ... import React, { Component } from "react"; import Roomjoinpage from "./Roomjoinpage"; import CreateRoomPage from "./CreateRoomPage"; import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom"; export default class App extends Component { render() { return ( ); } } class HomePage extends Component { render() { return ( the Home Page ); } } can someone talk about this..

  • @croose

    @croose

    8 ай бұрын

    Thank you so much, this was very helpful.

  • @muhdmahmood

    @muhdmahmood

    7 ай бұрын

    you are a life save...i send you a xmas gift if i was santa.....=)

  • @JaquelineKyle

    @JaquelineKyle

    7 ай бұрын

    I can't thank you enough!

  • @ClementSuresh612

    @ClementSuresh612

    6 ай бұрын

    You just saved hours of work. Thank you 🙂

  • @tljstewart
    @tljstewart Жыл бұрын

    In 2022, if your components aren't rendering, make these changes: These are updates required for React Router 6

  • @mabbiera250

    @mabbiera250

    Жыл бұрын

    It worked for me, thanks

  • @5Rassel5

    @5Rassel5

    Жыл бұрын

    badass

  • @collingodfrey2787

    @collingodfrey2787

    Жыл бұрын

    Cannot thank you enough!

  • @King-yj2jx

    @King-yj2jx

    Жыл бұрын

    Thank you sir!

  • @robin2080

    @robin2080

    Жыл бұрын

    thanks boss

  • @for41
    @for412 жыл бұрын

    in case you get this error: "export 'Switch' (imported as 'Switch') was not found in 'react-router-dom'" Change: This is the home page to The reason is "switch" has been replaced with "routes" in newer versions.

  • @kowdhon1562

    @kowdhon1562

    2 жыл бұрын

    This comment help me my bad, Thank you very much !!!

  • @MiloCoder

    @MiloCoder

    2 жыл бұрын

    And then a hero came along. Thank you.

  • @khd1451

    @khd1451

    2 жыл бұрын

    What is suspense

  • @cloudboysmusic5223

    @cloudboysmusic5223

    2 жыл бұрын

    @@khd1451 Just ignore it

  • @pilote111

    @pilote111

    2 жыл бұрын

    YES!!! it didn't worked until I saw your comment. Thx 😄

  • @akira_asahi
    @akira_asahi Жыл бұрын

    Manual setup is painful to go through but it teaches you so much. Totally worth it. Thank you for the detailed explanation.

  • @HitraNtheProgrammer
    @HitraNtheProgrammer3 жыл бұрын

    Bro, I don't know how you are doing it so many high quality tutorials! Unbelievable!

  • @mrbach5063
    @mrbach50632 жыл бұрын

    If anyone having problem with displaying paths, 2 options: n1 Swtich == Routes, Components == Elements, elements = { } n2 npm uninstall react-router-dom npm install react-router-dom@5.2.0 works just fine :)

  • @johnanthony6612

    @johnanthony6612

    2 жыл бұрын

    Thanks for this I was actually having this error now. In order to use the latest version of react-router-dom do this in your homepage: import { BrowserRouter as Router, Routes, Route, Link, Redirect, } from "react-router-dom"; export default class HomePage extends Component { constructor(props) { super(props); } render() { return } }

  • @gee9099

    @gee9099

    2 жыл бұрын

    @@johnanthony6612 THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @johnanthony6612

    @johnanthony6612

    2 жыл бұрын

    @@gee9099 templates seem like the way to go I don't remember if this makes use of two servers or proxies to connect the frontend and backend but with this you only need to run the backend and react will compile directly to the template folder

  • @doug5240

    @doug5240

    2 жыл бұрын

    @@johnanthony6612 Thanks! I figured the Route / Switch substitution, but was still getting a blank page. With your code I was able to fix the bug!

  • @douglasazevedo2586

    @douglasazevedo2586

    2 жыл бұрын

    @@johnanthony6612 Dude, thank you! I'm beginner and you and @MrBach help me a lot now

  • @dolbyagarwal9316
    @dolbyagarwal93162 жыл бұрын

    Hey Tim, so I am aware about django but new to react. So this collaboration of django with react is very new to me. I just started this 4th video and after hearing the start intro about you apologizing for the previous long video and its detailed setup, I really really have to say this. Thanks Buddy!!!! I genuinely want to understand every part of video and the setup you showed really helps. While I would ask others to also google stuff to learn if you think something isn't proper for you. that really helps out for self learning. Again thanks mate for this awesome video!!! 😀

  • @jamielee6432
    @jamielee64322 жыл бұрын

    Thanks to the comments I was able to fix the Switch to Routes problem 😃 I also had to do this: it worked after putting the tag inside elements instead of putting it between the Route tags

  • @ravindusandaruwan5775

    @ravindusandaruwan5775

    Жыл бұрын

    thanks

  • @dexterasis1004

    @dexterasis1004

    5 ай бұрын

    Same thing with me. Went crazy on this.

  • @AndrewMoMoney
    @AndrewMoMoney3 жыл бұрын

    The beginning section where you answer comments should be REACTions with Tim. I liked my own joke so much, I'm subscribing hahaha. Keep up the great stuff!

  • @cl1399
    @cl1399 Жыл бұрын

    this is the correct routing that works in 2023: import React, { Component } from "react"; import RoomJoinPage from "./RoomJoinPage"; import CreateRoomPage from "./CreateRoomPage"; import { BrowserRouter as Router, Routes ,Route } from 'react-router-dom'; export default class HomePage extends Component { constructor(props) { super(props); } render() { return ( ); } }

  • @valeristoyanov5843

    @valeristoyanov5843

    10 ай бұрын

    It works, thank you!

  • @pixifiedbybooks

    @pixifiedbybooks

    8 ай бұрын

    Thank you so much! :)

  • @ocollinsgmailcom

    @ocollinsgmailcom

    6 ай бұрын

    Thank you!

  • @emilianocisterna3540

    @emilianocisterna3540

    4 ай бұрын

    Thank you mate! it works fine in 2024

  • @leophelan6768

    @leophelan6768

    3 ай бұрын

    I spent ages figuring this out, if only I read comments sooner : (

  • @michaelflores3767
    @michaelflores37676 ай бұрын

    I 100% appreciate you going through all the steps no matter how long. You said it. If you don't understand the code it can take you hours if something goes wrong to try and untangle or figure out the problem and you will end up learning either way. Might as well learn upfront before issues happen. Right? Great content.

  • @saumyaverma9581
    @saumyaverma95813 жыл бұрын

    2:26 I felt him. And by these videos, he is saving my life.

  • @prithviprakash1110
    @prithviprakash11103 жыл бұрын

    Bruv, the quality on these tutorials are mad. Thanks a lot. Really am learning a LOT!!

  • @MsBen678
    @MsBen6783 жыл бұрын

    You should put the router in the App component. That way, if you want to add say, navigation to the sidebar, you could throw that component in App, and it will have access to the Router. It also puts HomePage at the same architectural level as the other pages.

  • @aaaaa-jn4sg
    @aaaaa-jn4sg2 жыл бұрын

    If you're getting an error that says you can't use/import 'Switch' from BrowserRouter use 'Routes' instead of 'Switch' and change the syntax for each Route to be for all of your routes

  • @yonatangoldin

    @yonatangoldin

    2 жыл бұрын

    how should i write the switch statement instead? i didnt understand your comment all the way

  • @greengoggles

    @greengoggles

    Жыл бұрын

    @@yonatangoldin render(){ return ( ); }

  • @sumeet321

    @sumeet321

    Жыл бұрын

    @@greengoggles I have all three messages appearing on the home page and I wrote exactly what you have

  • @GolfyMcG

    @GolfyMcG

    Жыл бұрын

    @@greengoggles Thank you! This thread was helpful but your explicit comment on setting the element property is what fixed my issue.

  • @leaogauzinho

    @leaogauzinho

    Жыл бұрын

    @@greengoggles Thanks! I was stuck on that.

  • @ericajcruz
    @ericajcruz Жыл бұрын

    I am truly learning from you going into such detail. I want to understand what it all really means, so I can actually use it in practice. please keep it up Tim!

  • @o_poky9359
    @o_poky93593 жыл бұрын

    i dont even want to learn react i just came here to thank him for teaching me sockets and pygame. Im making my fourth game

  • @shawnbeans7389

    @shawnbeans7389

    3 жыл бұрын

    you are a nice person

  • @o_poky9359

    @o_poky9359

    3 жыл бұрын

    @@shawnbeans7389 So are you :)

  • @foreversleepy4379

    @foreversleepy4379

    3 жыл бұрын

    Yeah, stick to making games. Game developer, here. You actually learn how to program and you learn the fundamentals of programming and computing. In web dev, you don't really learn much of anything apart from being good at battling with tools and frameworks. So much is hidden away from you to the point where it's actually harder to understand. I've never liked web dev, but these days it's really quite ridiculous. Can't wait to finish my uni module just so I never have to use another web framework ever again.

  • @ethanroman6883
    @ethanroman68833 жыл бұрын

    Actually it is high quality introductory, no one explained how Django and react works hand in hand that clear, that clear . Thank you 🙏

  • @Anonymous-xk4dg

    @Anonymous-xk4dg

    3 жыл бұрын

    is that end a bob ross reference?

  • @markogartnar5658
    @markogartnar56583 жыл бұрын

    16:14 If you only need the div to wrap the inside components you can just use ... instead so you don't have useless divs in your html.

  • @abbasanandwala4222
    @abbasanandwala42223 жыл бұрын

    Hello Tim, you can write the route for "/" at last without using exact keyword and it should work fine as well. Thanks for this awesome series 👍🏻

  • @devhypercoder6772

    @devhypercoder6772

    3 жыл бұрын

    thats a good tip

  • @m.iqbalmaulana7328

    @m.iqbalmaulana7328

    3 жыл бұрын

    nice, this is working, thanks

  • @muhammadlutfirahmawan8327

    @muhammadlutfirahmawan8327

    3 жыл бұрын

    Like /home/ instead of /home +exact? Am I right?

  • @jarrodolivier6317

    @jarrodolivier6317

    3 жыл бұрын

    @@muhammadlutfirahmawan8327 I think they mean put it (the home page with no specific path) as the last route in the Switch tags, that works for me.

  • @victoritodo7544
    @victoritodo7544 Жыл бұрын

    Hi Tim, thanks so much for this tutorial. It covers a whole lot about React and Django! Really helpful!

  • @shkrmkr
    @shkrmkr3 жыл бұрын

    I don't know why you had to apologize Tim. Guys! He clearly stated that this series is not for beginners. Plus, if you're not a beginner in react , you can definitely translate class components to functional components on the spot.

  • @rice5817
    @rice58173 жыл бұрын

    I love the way you work your way through the project - as a continuous learner that simply shows us mere "mortals" that everything's fine and you WILL have some/all of these problems, bugs and/or difficulties. So far, this is very much the same setup as I landed on myself for my own project and I'm super excited to learn more about React's router as I realized literally a few days ago that I needed it and finally landed at your channel for 🆘🤣 Keep up the good work and wish all you cool nerds out there best of luck with your projects 😊

  • @yashainu6047
    @yashainu6047 Жыл бұрын

    yes, you're right. at the beginning we just let everything set up and run. then after everything goes well, we can slowly understand the 'concepts' and the 'standards'

  • @sushi2slushy
    @sushi2slushy2 жыл бұрын

    On "npm run dev" I encountered the error: "WARNING in DefinePlugin Conflicting values for 'process.env.NODE_ENV'", I had to change the NODE_ENV value in webpack.config.js to "development" from "production" for it to build properly

  • @valeristoyanov5843

    @valeristoyanov5843

    10 ай бұрын

    Thank you sir

  • @mxrcochxvez
    @mxrcochxvez3 жыл бұрын

    I really appreciate you taking the time to make these fantastic videos. I greatly appreciate it. I also thank you a lot for explaining and responding to people's comments. You rock! I am learning a ton.

  • @ankitaburman5406
    @ankitaburman54063 жыл бұрын

    One of the best tutorial videos for React and Django . Thank you so much Tim ,Learnt so many things.

  • @lemoonadee
    @lemoonadee2 жыл бұрын

    If the changes aren't visibe after reloading or Hard relaoding you might have problem in webpack.config file to confirm that this is the issue check you terminal in which you're running NPM commands and if it has "Conflicting values for 'process.env.NODE_ENV'" error that means it is something that is stopping you reload to solve this issue search the error on StackOverflow it has several solutions.

  • @judahsan

    @judahsan

    2 жыл бұрын

    Noted

  • @FakeAssHandsomeMcGee_
    @FakeAssHandsomeMcGee_3 жыл бұрын

    I am newish to Python but do have some experience with React. Seeing the classes did throw me off, but it is not hard to convert the classes to functions/hooks. Many thanks for the excellent tutorial!

  • @volfcan8330
    @volfcan83309 ай бұрын

    For those who struggling with this tutorial. In React Router version 6 (as of September 2021), the Switch component has been replaced with the Routes component. The Routes component is responsible for rendering the appropriate component based on the URL path. You can use it in your code as shown below: render() { return ( ); }

  • @abhiverma24
    @abhiverma243 жыл бұрын

    That's nice tutorial covering up basics of react with django soon I'll be using it in my web app👍

  • @kusuosaiki5259
    @kusuosaiki52592 жыл бұрын

    This tutorial series is entertaining as well as interesting

  • @kanharusia9399
    @kanharusia93993 жыл бұрын

    Hello Tim Some things I want to learn are : 1. Logging System with 2 views administrator privileges and Customer privilages. 2. Upload Image for example change profile picture. Thanks Ankit Rusia

  • @pravarsharma
    @pravarsharma3 жыл бұрын

    Wait is over, video is here, thanks for this series

  • @samcodes2912

    @samcodes2912

    3 жыл бұрын

    great series

  • @symbolminded5167
    @symbolminded51673 жыл бұрын

    I had a problem with a magical npm run "script_name" command, so my solution was simply moving to linux lol. Great content by the way, thank you for your educational sharing with us, Tim.

  • @krisvincenttanong1079
    @krisvincenttanong10792 жыл бұрын

    I have been stuck on my react links not rendering its component instead returns a blank page thankfully I fixed it what I did was updated my react-router-dom this is thanks to Yuyutsu Rai from the youtube comments do his steps and change this to this hopefully this helps you out.

  • @nafiyad1950
    @nafiyad19503 жыл бұрын

    thanks for the effort you give to teach us and keep up with the great content

  • @mohamedmzoughi8234
    @mohamedmzoughi82343 жыл бұрын

    Bro everybody makes mistake .We all want to thank you for the good quality content and keep up with good work thanks again

  • @andgaming591
    @andgaming5913 жыл бұрын

    I appreciate your hard work, thank you for teaching.

  • @nguyenhuyentram4371
    @nguyenhuyentram43712 жыл бұрын

    Thank you for the videos and the values you're contributing to the community. Personally, it's not the perfect contents but your humbleness and consideration in sharing make the learning journey with you is great. Keep up the spirit.

  • @user-vw5si9oe5v
    @user-vw5si9oe5v3 жыл бұрын

    after watching these video and some django and react blogs , the direction became much more clear

  • @_Kanad_Patil_TE_IT
    @_Kanad_Patil_TE_IT3 жыл бұрын

    Thank you so much sir 😭.....you saved my life....actually I messed up in django's urls and reacts route combination...but because of you this problem is solved and I understood everything that you teached . thank you so much ..

  • @muhdmahmood
    @muhdmahmood8 ай бұрын

    HI Tim loving the content so far. any new tutorials for 2023?

  • @cjsport1254
    @cjsport12543 жыл бұрын

    I appreciate the method of teaching here. Plus I'm coming in with some Django and React experience. But Tim is helping me put it all together.

  • @bruceaxelrod8291
    @bruceaxelrod82913 жыл бұрын

    Can someone plz tell me how is the bundled file in the static folder named **main.js** I know this is the webpack config responsible for it output: { path: path.resolve(__dirname, "./static/frontend"), filename: "[name].js", }, What is the [name] doing there exactly. From where is it getting the name **main**

  • @mauro_carvajal

    @mauro_carvajal

    3 жыл бұрын

    the [name] part is expecting that the user pass some variable for custom naming, when none is passed it defaults to main so thats why the file is named main.js

  • @bruceaxelrod8291

    @bruceaxelrod8291

    3 жыл бұрын

    @@mauro_carvajal Thanks

  • @techwithkaran6412
    @techwithkaran64123 жыл бұрын

    Hi Tim, I really do understand what you are doing and I think what you have done is awesome in the last video. The only thing is if anyone who is familiar with react won't find it difficult

  • @sourabhupadhye4915
    @sourabhupadhye49153 жыл бұрын

    This Tutorial is actually helping me even in 2021 :P

  • @grane4
    @grane42 жыл бұрын

    No need to use exact at 23:36 just put the "/" case last, since the matching starts at the beginning and we can say "/" acts as the switch default

  • @nanohedron
    @nanohedron3 жыл бұрын

    ...and thanks for the step-by-step setup. I, for one, needed that.

  • @nanohedron

    @nanohedron

    3 жыл бұрын

    ...and thanks for explaining how changes to state will trigger a re-render of the parent component. That's another important thing I still had not learned.

  • @mattinyysanen4278
    @mattinyysanen42783 жыл бұрын

    Hi! Excellent video! You explain things well and have great style and rhytm on these videos. By the way, what you did in CSS-file is paritially not necessary, you don't need to write all same styles for main and app div because app inherits main's styles because it is its parent. And comments in css are written by /* comment here */.

  • @StanSays

    @StanSays

    3 жыл бұрын

    in VS Code no matter what language toggle comment for a line is Ctrl+/

  • @damntwhsu9114
    @damntwhsu91142 ай бұрын

    For anyone who are having blank pages, make sure you have install "npm install react-router-dom" . Also using dev tool in your browser will be a good way to check the error. Good Luck!

  • @kertaspangan5494
    @kertaspangan54943 жыл бұрын

    Thank You for this tutorial, this is helpful

  • @ivanveremeichik
    @ivanveremeichik2 жыл бұрын

    Hi, Tim, maybe you know how to solve the problem with blank screen. I' ve tried everything from comments but there wasn't any result? Edit: npm install react-router@5.2.0 npm install react-router-dom@5.2.0 helped me

  • @maxraven9138

    @maxraven9138

    2 жыл бұрын

    Thank youuuu!!!!!!

  • @bhavyapatel3725

    @bhavyapatel3725

    2 жыл бұрын

    Thank you this helped me too!!!

  • @vuquynhduong7953
    @vuquynhduong79532 жыл бұрын

    Thank you very much for your videos! I've learnt a lot

  • @suryanshtokas6337
    @suryanshtokas63373 жыл бұрын

    Legend says if you are first then Tim hearts ur comments. Big fan from India BTW great tutorial series Tim

  • @TechWithTim

    @TechWithTim

    3 жыл бұрын

    :)

  • @suryanshtokas6337

    @suryanshtokas6337

    3 жыл бұрын

    @@TechWithTim thanks mate for the great work keep it up. Can u do a algorithm series with python on KZread?

  • @Systemx93
    @Systemx933 жыл бұрын

    📌 100% important comment How to link 🔗 react with django + deploy to heroku. It's super hard

  • @Victor-xx1vv
    @Victor-xx1vv2 жыл бұрын

    also for the route they changed it and how I fixed the problem was to do this import { BrowserRouter as Router, Route, Routes, Link, useRoutes, Redirect } from "react-router-dom"; const App = () => { const routes = useRoutes([ { path: '/', element: This is home page}, { path: '/join', element: }, { path: '/create', element: }, ]); return routes; }; const AppWrapper = () => { return ( ); }; export default AppWrapper;

  • @deepon4128

    @deepon4128

    Жыл бұрын

    thank you bro thats working now

  • @ej6657

    @ej6657

    Жыл бұрын

    Thank You Brother.. I love you so much lol

  • @tsvetomir98

    @tsvetomir98

    Жыл бұрын

    Thanks

  • @faneeshmunjal2880
    @faneeshmunjal28803 жыл бұрын

    Tim you can just press control + / to comment out the line.

  • @sakethparimi7664

    @sakethparimi7664

    3 жыл бұрын

    on mac it is cmd + /

  • @abhigyanjaiswal5
    @abhigyanjaiswal53 жыл бұрын

    Video doesn't have a single dislike

  • @TecnoTutosMarc
    @TecnoTutosMarc3 жыл бұрын

    Hello Tim, thank for your time for make videos. I have one question, why is interesting use Django with React, in other words, what features you can add to Django?

  • @Mohit-nn9bt
    @Mohit-nn9bt3 жыл бұрын

    I am still at 10:05 and i am impressed by the way you started explaining everything. last video i commented about not understanding anything and in the next video so much better explanation...Thanks Tim for being here on KZread...A Big Fan from India

  • @RichellyItalo
    @RichellyItalo3 жыл бұрын

    If you dont wanna create route each route in reactjs, add this in main urls.py: re_path(r'^(?:.*)/?$', include('frontend.urls'))

  • @vidithbalasa1237

    @vidithbalasa1237

    3 жыл бұрын

    appreciate it

  • @johnjennings7115
    @johnjennings71153 жыл бұрын

    These videos are awesome! Very useful information presented clearly and at a good rate. You're a very impressive young developer! Keep up the good work, Tim!

  • @akashgkrishnan9596
    @akashgkrishnan95963 жыл бұрын

    Heyy Tim!!!.. Hope you see this comment. Merry Christmas. One thing I wanted to point out was while recording it would be nice if the line in focus that is being typed is in the middle of the screen rather sometimes it is at the bottom and gets overlapped by the seek bar and the video controls of the youtube player..

  • @nanohedron
    @nanohedron3 жыл бұрын

    I'm glad to find class-based React here, because I'm looking to convert vanilla JS classes over once I've learned enough. So thanks, and thumbs up!

  • @nanohedron

    @nanohedron

    3 жыл бұрын

    Also, I've heard that there are a good number of companies that still use class-based React. Just what I've heard, but it makes sense since there are definitely a lot of companies still hiring people for much older tech like jQuery and PhP. Who know - maybe there are actually still more actively maintained sites out there that are written in class-based React than function-based.

  • @ladywebber1726
    @ladywebber17263 жыл бұрын

    i have learned a lot with you..Thank you :)

  • @andronickmartusheff4036
    @andronickmartusheff40363 жыл бұрын

    so glad i'm on this one early.. thank you tim!

  • @mkalanithi8747
    @mkalanithi87473 жыл бұрын

    Hi Tim, Use the "AutoSave" function of Visual Studio Code. It will make the task easier... Goto "File", then tick "Auto Save"

  • @user-ny1tf2mp2h
    @user-ny1tf2mp2h23 күн бұрын

    mine still says 'Testing React Code" cant figure this out. Thats not even written in my app.js anymore

  • @murtazamohseni4382
    @murtazamohseni43823 жыл бұрын

    wiating for the 5th video :) it is an amazing series

  • @themattellis
    @themattellis3 жыл бұрын

    These videos are great! Keep up the great content. Are you going to be using react hooks etc?

  • @RohitSaini-go3cr

    @RohitSaini-go3cr

    3 жыл бұрын

    He is using class components so he will not be using hooks maybe

  • @erikadeveckova6580
    @erikadeveckova6580 Жыл бұрын

    Instead of a wrapping div you might use React.Fragment. Its a wrapper that does not create an addiotional div in the DOM tree after the template or app has been rendered, thus keeping the DOM skeleton shorter.

  • @jubahamadi6976
    @jubahamadi69763 жыл бұрын

    very good playlist, it is very well explained, jspr that it does not stop so early, and please if you could include in your application a system for making appointments, between the users. thank you very much for the playlist you are very strong, good luck.

  • @bhavikjain1077
    @bhavikjain10773 жыл бұрын

    Hey If anyone got the blank screen then you can use import React, {Component} from "react"; class HomePage extends React.Component { // ... } Hope it helps

  • @WeedoGaming
    @WeedoGaming3 жыл бұрын

    If you're using ads block, make sure to turn it off. I figured it out why my text didn't display!

  • @teodora382
    @teodora38210 ай бұрын

    Hello. I followed everything and when I run the server nothing shows up and I have this error on console: main.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) index.css:1 Failed to load resource: the server responded with a status of 404 (Not Found) index.css:1 Failed to load resource: the server responded with a status of 404 (Not Found) And this error on my terminal: [08/Oct/2023 22:09:34] "GET /static/%20frontend/main.js HTTP/1.1" 404 1812 [08/Oct/2023 22:10:39] "GET /static/%20css/index.css HTTP/1.1" 404 1803 How dod I fix this?

  • @samcodes2912
    @samcodes29123 жыл бұрын

    love your transparency Tim👍

  • @Obbe79
    @Obbe793 жыл бұрын

    you should also see the easy way to start a react app

  • @parthsinghrajput1062
    @parthsinghrajput10623 жыл бұрын

    Yo Tim Wonderful Tutorial

  • @tankaiyi6164
    @tankaiyi61643 жыл бұрын

    10:28, I had tried to change the text of render, but it doesn't change to any even that I write Any. It still showing "Testing React Code". I had skipped the command of "conda activate spotify", is this fatal error? I'm using Python 3.8.0. I had tried to download your source code and rerun without the command of "conda activate spotify", it still gets wrong. If it is a fatal error, can you tell me about how to apply command of "conda activate spotify"?

  • @the3dhuman574

    @the3dhuman574

    3 жыл бұрын

    I had this problem just now and, after going insane for a good 10 minutes, I solved it. I simply pressed ctrl + c on the Django server terminal and a bunch of text popped up really quickly, and I did it again and the server closed, and finally, I started the server up again and it worked. If this doesn't work for you, I also cleared my browser cache, because the internet said so, but I'm not too sure this did anything. Hope this helps!

  • @ryanfarish5433

    @ryanfarish5433

    3 жыл бұрын

    @@the3dhuman574 I had the same problem but now it loads properly after I cleared the browser cache. Thanks!

  • @tankaiyi6164

    @tankaiyi6164

    3 жыл бұрын

    ​@@the3dhuman574 Thank you, your solution had solved my problem.

  • @tankaiyi6164

    @tankaiyi6164

    3 жыл бұрын

    @@the3dhuman574 I found a simpler way to solve cache problem. Just click ctrl-f5 to reload our page. It will reload with clear cache.

  • @the3dhuman574

    @the3dhuman574

    3 жыл бұрын

    @@tankaiyi6164 oh cool thx

  • @_Kanad_Patil_TE_IT
    @_Kanad_Patil_TE_IT3 жыл бұрын

    you are just awesome....learned a lot !

  • @manoelisaacbalamherrera1775
    @manoelisaacbalamherrera17753 жыл бұрын

    wonderful explanation

  • @behjaf
    @behjaf3 жыл бұрын

    thank you for these tutorials

  • @m.iqbalmaulana7328
    @m.iqbalmaulana73283 жыл бұрын

    Hey tim, I would like to know why we still need JQuery here? I never use JQuery before, but from what I heard JQuery is old and heavy, so there's why we move to a more modern framework like react for example. Thanks

  • @BlueBrendan2000
    @BlueBrendan20003 жыл бұрын

    Does anyone know why both commands "python manage.py runserver" and "npm run dev" need to be run for the page to reload properly (the part at 10:09)? I discovered that when I only ran the Django command, the browser would load text from main.js (the super long file that was automatically created during npm setup) instead of the .js file that was supposed to be called by index.html. The browser wouldn't reflect changes I made, even after refreshing the cache and reloading. After I ran the command "npm run dev", the browser would load from the correct file and update accordingly. In a previous project that used Django and React, I only had to run the Django command for everything to work so this confuses me.

  • @joshdotmp4

    @joshdotmp4

    3 жыл бұрын

    The way that the tutorial is set up, it uses webpack to transpile your react code from "index.js" into "main.js". With the tutorial's configuration, the django server is reading index.html which references main.js, not index.js Normally, main.js does not automatically update to match the contents of index.js. Running "npm run dev" causes it to automatically update. You can see what the dev script does in package.json Hopefully this helps! I'm learning all this myself too, but this is my understanding. Not sure exactly why webpack is necessary, but that's just the way the tutorial does it. If I'm wrong, hopefully someone will correct me

  • @kieransmith9865
    @kieransmith98653 жыл бұрын

    Whenever I change the HTML in the render function, my page doesn't update? I've tried preventing cache reloads but it doesn't work for me, can anyone help?

  • @the3dhuman574

    @the3dhuman574

    3 жыл бұрын

    I had this problem just now and, after going insane for a good 10 minutes, I solved it. I simply pressed ctrl + c on the Django server terminal and a bunch of text popped up really quickly, and I did it again and the server closed, and finally, I started the server up again and it worked. If this doesn't work for you, I also cleared my browser cache, because the internet said so, but I'm not too sure this did anything. Hope this helps!

  • @kieransmith9865

    @kieransmith9865

    3 жыл бұрын

    @@the3dhuman574 Thank you for your help, but I realised I hadn't done npm run dev

  • @abhinavjha98

    @abhinavjha98

    3 жыл бұрын

    Hey Just press Ctrl + F5 on browser it will work.

  • @shanaiajishin7269

    @shanaiajishin7269

    3 жыл бұрын

    @@abhinavjha98 It did, thank you!

  • @lucianoandres420

    @lucianoandres420

    3 жыл бұрын

    Try using another browser, it's work for me

  • @techwithgantavya6381
    @techwithgantavya63813 жыл бұрын

    Dude these are heck of tut's loved them man

  • @felipepenha9205
    @felipepenha92053 жыл бұрын

    If your changes does not appear when you hit F5, try import React, { Component } from 'react'; with 'react', not "react".

  • @tawfeeqzaghlool2549

    @tawfeeqzaghlool2549

    Жыл бұрын

    This one works for me. Thanks.

  • @hamdimohamed8913
    @hamdimohamed89133 жыл бұрын

    imagin i deleted App.js and still get the same output on the webpage from the first time i tested it !!

  • @preethamlekkala418

    @preethamlekkala418

    3 жыл бұрын

    what to do then?

  • @hamdimohamed8913

    @hamdimohamed8913

    3 жыл бұрын

    i guess reboot everything sometimes even with Django boostrap the updated css files won't load

  • @joshbickett754
    @joshbickett7542 жыл бұрын

    Thanks Tim!

  • @christiansongplaylist7004
    @christiansongplaylist70043 жыл бұрын

    really helpful thank you so much

  • @ayaanp
    @ayaanp3 жыл бұрын

    Another new video from the best youtube channel.

  • @vedantsingh2621
    @vedantsingh26213 жыл бұрын

    Please never quit making youtube video.

  • @magicmagus1459
    @magicmagus14593 жыл бұрын

    Hi Tim! Big fan of you... even though you're same age as me! haha....

  • @TechWithTim

    @TechWithTim

    3 жыл бұрын

    Hey, thanks!

  • @samcodes2912

    @samcodes2912

    3 жыл бұрын

    that's nice

  • @achrafboucetta7215
    @achrafboucetta72153 жыл бұрын

    love u so much Tim, such a helpful tutorial

  • @antonylinsheep
    @antonylinsheep Жыл бұрын

    this video is so so good

  • @user-iy2gp9bz1f
    @user-iy2gp9bz1f3 жыл бұрын

    btw if someone doesn't get custome components but just html as you wrote it try renaming your components so that they start with a capital letter

  • @sayedaminulmunna421
    @sayedaminulmunna4213 жыл бұрын

    Thank you for your effort ...

  • @omlondhe
    @omlondhe3 жыл бұрын

    It's not HTML text which you are returning but it is called as JSX i.e. JavaScript Expression which render method usually returns

  • @user-ru1ry8nu6e
    @user-ru1ry8nu6e Жыл бұрын

    I had the same issue after episode 3 but tried to push through. The websites just load a blank page regardless of which page I am on (if I am on the join page or the main page or whatever). Anyone have any idea as to what the issue could be? I have copied his code for all the components and my code doesn't seem to have any errors. Thank you!

  • @Leptonite

    @Leptonite

    Жыл бұрын

    I was also having a problem like yours and someone else on this page commented this: If you're getting an error that says you can't use/import 'Switch' from BrowserRouter use 'Routes' instead of 'Switch' and change the syntax for each Route to be for all of your routes render(){ return ( ); } it might help

  • @Leptonite

    @Leptonite

    Жыл бұрын

    dont forgter to import Routes instead of Switch