Тёмный

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

Tech With Tim
Подписаться 1,6 млн
Просмотров 132 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 366   
@readcoderepeat
@readcoderepeat 11 месяцев назад
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 9 месяцев назад
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 9 месяцев назад
Thank you so much, this was very helpful.
@muhdmahmood
@muhdmahmood 9 месяцев назад
you are a life save...i send you a xmas gift if i was santa.....=)
@JaquelineKyle
@JaquelineKyle 8 месяцев назад
I can't thank you enough!
@ClementSuresh612
@ClementSuresh612 7 месяцев назад
You just saved hours of work. Thank you 🙂
@HitraNtheProgrammer
@HitraNtheProgrammer 3 года назад
Bro, I don't know how you are doing it so many high quality tutorials! Unbelievable!
@tljstewart
@tljstewart 2 года назад
In 2022, if your components aren't rendering, make these changes: These are updates required for React Router 6
@mabbiera250
@mabbiera250 2 года назад
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
@mattinyysanen4278
@mattinyysanen4278 3 года назад
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+/
@sourabhupadhye4915
@sourabhupadhye4915 3 года назад
This Tutorial is actually helping me even in 2021 :P
@nafiyad1950
@nafiyad1950 3 года назад
thanks for the effort you give to teach us and keep up with the great content
@muhdmahmood
@muhdmahmood 9 месяцев назад
HI Tim loving the content so far. any new tutorials for 2023?
@Systemx93
@Systemx93 3 года назад
📌 100% important comment How to link 🔗 react with django + deploy to heroku. It's super hard
@parthsinghrajput1062
@parthsinghrajput1062 3 года назад
Yo Tim Wonderful Tutorial
@sethkd123
@sethkd123 Год назад
Though it works for me with "/" to put on first render() { return ( ); }
@VasiliosKambouras
@VasiliosKambouras 3 года назад
I would make sure dev is running while running server to see changes
@mohamedsafwat545
@mohamedsafwat545 3 года назад
the # in the css should be a . , that's why you get a blank page
@uKaigo
@uKaigo 3 года назад
Wow I was watching this series thinking it was old, but this video is 5 hours old
@dexterasis1004
@dexterasis1004 6 месяцев назад
I was about to give up just because of the Switch not working. I found the answer through chat GPT, but I should've read the comments first.
@vladstefanuleia4737
@vladstefanuleia4737 6 месяцев назад
i changed my code like the comments say but still doesn't work, any advice?
@corrieraiford5366
@corrieraiford5366 3 года назад
Hey i am having problems. when i try and run my server using the "npm run dev" i get an error that says "syntax jsx isn't currently enabled". i have tried everything and it still doesn't work, any tips?
@shiyaamsunder.m.s3427
@shiyaamsunder.m.s3427 3 года назад
In the routing problem you had, instead of using exact you can just place the "/" route below all the routes.
@naiadbaksh3996
@naiadbaksh3996 2 года назад
Does anyone know how to deploy this? Please help.
@RocseyXAmine
@RocseyXAmine 3 года назад
❤️
@for41
@for41 2 года назад
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 😄
@sushi2slushy
@sushi2slushy 2 года назад
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 Год назад
Thank you sir
@krystynaa4943
@krystynaa4943 11 дней назад
THANKS
@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 Год назад
It works, thank you!
@pixifiedbybooks
@pixifiedbybooks 9 месяцев назад
Thank you so much! :)
@ocollinsgmailcom
@ocollinsgmailcom 7 месяцев назад
Thank you!
@emilianocisterna3540
@emilianocisterna3540 5 месяцев назад
Thank you mate! it works fine in 2024
@leophelan6768
@leophelan6768 4 месяца назад
I spent ages figuring this out, if only I read comments sooner : (
@mrbach5063
@mrbach5063 2 года назад
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
@AndrewMoMoney
@AndrewMoMoney 3 года назад
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!
@aaaaa-jn4sg
@aaaaa-jn4sg 2 года назад
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.
@Victor-xx1vv
@Victor-xx1vv 2 года назад
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
@bruceaxelrod8291
@bruceaxelrod8291 3 года назад
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
@markogartnar5658
@markogartnar5658 3 года назад
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.
@ivanveremeichik
@ivanveremeichik 2 года назад
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!!!
@sudhanvag6838
@sudhanvag6838 5 дней назад
tnx mate..
@krisvincenttanong1079
@krisvincenttanong1079 2 года назад
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.
@jamielee6432
@jamielee6432 2 года назад
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 6 месяцев назад
Same thing with me. Went crazy on this.
@MsBen678
@MsBen678 3 года назад
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.
@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.
@o_poky9359
@o_poky9359 3 года назад
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.
@teodora382
@teodora382 11 месяцев назад
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?
@lemoonadee
@lemoonadee 2 года назад
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
@AmandaGomez-v5o
@AmandaGomez-v5o 2 месяца назад
mine still says 'Testing React Code" cant figure this out. Thats not even written in my app.js anymore
@tankaiyi6164
@tankaiyi6164 3 года назад
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
@dolbyagarwal9316
@dolbyagarwal9316 2 года назад
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!!! 😀
@RichellyItalo
@RichellyItalo 3 года назад
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
@bhavikjain1077
@bhavikjain1077 3 года назад
Hey If anyone got the blank screen then you can use import React, {Component} from "react"; class HomePage extends React.Component { // ... } Hope it helps
@kieransmith9865
@kieransmith9865 3 года назад
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
@saumyaverma9581
@saumyaverma9581 3 года назад
2:26 I felt him. And by these videos, he is saving my life.
@magicmagus1459
@magicmagus1459 3 года назад
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
@m.iqbalmaulana7328
@m.iqbalmaulana7328 3 года назад
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
@abbasanandwala4222
@abbasanandwala4222 3 года назад
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.
@BlueBrendan2000
@BlueBrendan2000 3 года назад
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
@ParsaHesam-n2z
@ParsaHesam-n2z Год назад
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
@grane4
@grane4 2 года назад
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
@hamdimohamed8913
@hamdimohamed8913 3 года назад
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
@WeedoGaming
@WeedoGaming 3 года назад
If you're using ads block, make sure to turn it off. I figured it out why my text didn't display!
@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!
@djoezi3662
@djoezi3662 2 года назад
I've tried everything but it still doesn't work I have problem with Routers Someone please help me!
@kanharusia9399
@kanharusia9399 3 года назад
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
@vishal5545
@vishal5545 3 года назад
ERROR in ./src/components/App.js 4:0-90 Module not found: Error: Can't resolve 'react-router-dom' in 'C:\Users\vinee\My Projects\RestaManagement estfrontend\src\components' resolve 'react-router-dom' in 'C:\Users\vinee\My Projects\RestaManagement estfrontend\src\components' Parsed request is a module using description file: C:\Users\vinee\My Projects\RestaManagement estfrontend\package.json (relative path: ./src/components) Field 'browser' doesn't contain a valid alias configuration resolve as module Nothing is displaying on web page and getting above error. Pls help.
@michaelflores3767
@michaelflores3767 8 месяцев назад
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.
@damntwhsu9114
@damntwhsu9114 3 месяца назад
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!
@carter158
@carter158 3 года назад
Page is getting cached I've tried to disable cache and have done numerous hard reloads and even deleted the cache nothing works.
@skulltrick
@skulltrick 3 года назад
Same here...
@scottwalker4619
@scottwalker4619 3 года назад
@@skulltrick In your static/frontend folder, delete the js files. Then rerun npm run dev
@hilta7244
@hilta7244 3 года назад
@@scottwalker4619 I tried this, but still doesn work for me....
@hilta7244
@hilta7244 3 года назад
I fixed it, I'm running on mac, so I pressed Command + Shift + R on browser, then it worked.
@rajattiwari8226
@rajattiwari8226 Год назад
Instead of 'process.env.NODE_ENV' : JSON.stringify('production'), use this --> 'process.env.NODE_ENV' : JSON.stringify('development'), this is because the value/s inside ('----- this ---'), should not match with --> "build": "webpack --mode ----- this -----" in package.json file. Welcome in advance!!
@abhigyanjaiswal5
@abhigyanjaiswal5 3 года назад
Video doesn't have a single dislike
@imadlatch7206
@imadlatch7206 Год назад
Tons of coding , weird silly using external application like React to connect my internal API to render (my internal code!!! which is 80% less coding), funny.
@av4055
@av4055 Год назад
This is outdated as hell. I'm getting bugs and errors left and right. Tried uninstallig react-router-dom and downgrading but it seems impossible to do without getting errors. This sucks. I was really looking forward to completing this tutorial.
@shkrmkr
@shkrmkr 3 года назад
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.
@georgejoseph2601
@georgejoseph2601 Год назад
Is anyone else deviating from the tutorial at this point to set up a CRA app separately and add a Proxy to consume the REST APIs?
@deepakchacko5585
@deepakchacko5585 Год назад
Writing in 2023. If Router is not showing components, try this.
@divyeshchaudhari4119
@divyeshchaudhari4119 Год назад
The changes are not apparent on the webpage... It still shows that Testing msg from previous video ; - ; Help~
@TecnoTutosMarc
@TecnoTutosMarc 3 года назад
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?
@vinayakrastogi7388
@vinayakrastogi7388 5 месяцев назад
you used a command "conda activate spotify" in previous tutorial of this playlist i guess, is it package manager or something else, please help me set it up on my system
@kleejensen8684
@kleejensen8684 Год назад
Am running the "npm run dev" command with django server running but am still gating the old react componets rendered and even if i do changes in components its not being updated can anyone help me out??
@ramasonko7430
@ramasonko7430 3 года назад
could you explain the `conda activate spotify` at 10:25
@jjenn050
@jjenn050 3 года назад
It is a virtual environment so that you can have multiple python projects without libraries conflicting or bloating code.
@ramasonko7430
@ramasonko7430 3 года назад
@@jjenn050 thank you!
@NetflixFamsubs
@NetflixFamsubs 6 месяцев назад
Can anyone tell me why the path join/1 brings up a blank page and I do not get This is the room join page
@victoritodo7544
@victoritodo7544 Год назад
Hi Tim, thanks so much for this tutorial. It covers a whole lot about React and Django! Really helpful!
@faneeshmunjal2880
@faneeshmunjal2880 3 года назад
Tim you can just press control + / to comment out the line.
@sakethparimi7664
@sakethparimi7664 3 года назад
on mac it is cmd + /
@ytbook9639
@ytbook9639 Год назад
Bro please help me with react routing system because the one used in the video is outdatet how do i fix it it shows nothing on my page
@abhikmitralksutirstp8513
@abhikmitralksutirstp8513 2 года назад
Anyone getting blank pages? Would appreciate if anyone suggests a fix.
@VuNguyen-sd3zk
@VuNguyen-sd3zk 4 месяца назад
Great tutorial, but the blue switch keyboard sound is getting on nerve lol
@CMT-p6q
@CMT-p6q 3 месяца назад
modern react does not need exact they are set by defualt, and routers need be in the app rather the home page components
@binaprajapati7709
@binaprajapati7709 3 года назад
hey, I have tried doing this project 3 times and failed somewhere over this video. Hope I get through it
@parthsinghrajput1062
@parthsinghrajput1062 3 года назад
First Comment
@TechWithTim
@TechWithTim 3 года назад
second*
@parthsinghrajput1062
@parthsinghrajput1062 3 года назад
@@TechWithTim Third*
@parthsinghrajput1062
@parthsinghrajput1062 3 года назад
HEy Ti mWat A heart Hey can you pls make more tutorials on pyqt5
@youzi1993
@youzi1993 3 года назад
does this method make react rendering server we will not use express js or next js really i need a solution to my website i developed it with django and react but i found the spa problem with seo
@youzi1993
@youzi1993 3 года назад
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic import TemplateView urlpatterns = [ path ('admin /', admin.site.urls), re_path ('. *', TemplateView.as_view (template_name = "index.html")) ] here is my code and the rest done with react router dom
@Obbe79
@Obbe79 3 года назад
you should also see the easy way to start a react app
@symbolminded5167
@symbolminded5167 3 года назад
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.
@shubhamteredesai8692
@shubhamteredesai8692 3 года назад
Tim pl make html css webpage
@aadityamunjal7861
@aadityamunjal7861 3 года назад
Fifth!
@felipepenha9205
@felipepenha9205 3 года назад
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.
@luizmainart3169
@luizmainart3169 2 года назад
I'm getting this error while the npm compile: "WARNING in ./src/components/HomePage.js 11:91-97 export 'Switch' (imported as 'Switch') was not found in 'react-router-dom' (possible exports: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Navigate, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createRoutesFromChildren, createSearchParams, generatePath, matchPath, matchRoutes, renderMatches, resolvePath, useHref, useInRouterContext, useLinkClickHandler, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useParams, useResolvedPath, useRoutes, useSearchParams)" Can someone help me?
@ladywebber1726
@ladywebber1726 3 года назад
i have learned a lot with you..Thank you :)
@pravarsharma
@pravarsharma 3 года назад
Hey tim, isn't it a single page application, as the page is refreshing. Is there anything we could do in order to switch in between the pages without refreshing. Bdw thanks for the series, learning a lot from your channel🙏👍🏻
@henrylecompte4533
@henrylecompte4533 3 года назад
Yeah React Router Dom doesn’t refresh the page when you redirect. When you submit a form it auto refreshes the page but you can stop that by calling event.preventDefault() on the button or form submit event
@muhammadlutfirahmawan8327
@muhammadlutfirahmawan8327 3 года назад
Hi Tim, when will you continue your Django-React series?
@ThePhantomCoder
@ThePhantomCoder 3 года назад
He does a video every other day I think
@prithviprakash1110
@prithviprakash1110 3 года назад
Bruv, the quality on these tutorials are mad. Thanks a lot. Really am learning a LOT!!
@CodeHiveChannel
@CodeHiveChannel 3 года назад
The react router returns blank pages anyone knows why?
@limyeewee3518
@limyeewee3518 3 года назад
Same problem here I don't know why too
@franciscofuentes8916
@franciscofuentes8916 2 года назад
It'd be good if you updated this video
@abhiverma24
@abhiverma24 3 года назад
That's nice tutorial covering up basics of react with django soon I'll be using it in my web app👍
@zihuatenejo
@zihuatenejo 2 года назад
Ok, I just do not get why my App component is not reflecting the changes I am making... It is stuck on rendering "Testing React Code" instead of rendering the new three components, does someone have any idea whats wrong?
@jakubbochenek9203
@jakubbochenek9203 3 года назад
In the previous video some command created for you 2 files: main.js and main.js.LICENSE.txt but i got created just one file called [name.js]. I changed path and everything works fine but when i run 127... i got " sign on the top and got no idea from where and how to remove it. Could you please help me?
@scottpramuk7614
@scottpramuk7614 Год назад
My changes aren't showing up on the page unless I do "npm run dev" and still it doesn't work sometimes. Does anyone know what might be causing this?
@漢聲黃
@漢聲黃 2 года назад
Hi, Tim, there was nothing wrong with my runserver and npm run, no errors, but when I open up the 127 it show “not found”, been going back and forth between files but still haven’t found the bug T.T
@mkbrothers2348
@mkbrothers2348 9 месяцев назад
Sir can you explain how to deploy in vercel
@techmaniacc6065
@techmaniacc6065 2 года назад
This code is not showing anything on browser...U doing great but could anyone tell me the reason
@Requin5
@Requin5 2 года назад
Got the same problem have you found a solution?
@travisbrennan90
@travisbrennan90 2 года назад
I am having an issue. I even copied your code and still receive the same error in inspect. possibly a change in react since the tutorial was created? "Uncaught ReferenceError: App is not defined"
@kertaspangan5494
@kertaspangan5494 3 года назад
Thank You for this tutorial, this is helpful
Далее