My dear dude, I took an 18 week bootcamp, stuck 5 weeks now in a final project using react-router, ready to just give it up. THIS VIDEO HELPED ME GET THE MISSING PIECE. THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU I will be watching only your videos from now on! THANK YOU!
@TrevoltIV I understand. I also found Server Side rendering a pain in React as well. I'm knowledgeable in backend and usually use template rendering for fullstack hobby projects and hackathons, that's why I started React. My end goal is NextJS though. You think it's possible to jump in Nextjs without too much experience in React?
Thank god a direct video, simple with what i need. I searched a lot of videos that overcomplicated this simple concept. Subscribed, thanks for the easy explain
excellent video, showing how to properly setup the directory is so important, having watched many videos I had too continually change my folder directory and relevant paths in the app. Also great to note that all this should be in a client folder so that the API and Server folders can be the in the parent folder with the client. self learning coding is not easy, but having to do things right the first time is so important
My brother, keep making more videos, thanks react router was giving me the run around. Just subscribed and read you're profile, glad to see a christian and a gamer. Much love bro ❤
Thanks for the video! What if I have some links that I want them to redirect me to the for example contact page? I just use the url in href in element?
hey guys, if your routes works locally doesnt but DOESN'T WORK when you deploy your site (error): 1. make a file inside "public" folder called "_redirects" without file extension 2. copy paste "/* /index.html 200" to the file 3. redeploy your site this was a problem for me when i was deploying thru netlify and always getting error.
You've earned yourself a sub :) Thank you mate. Out of curiosity mate did you have a VSCode extension installed that allowed you to get the auto-predictive text suggestion at 10:46?
Thank you for the video! I have a problem: I deployed the web application, but when I open the URL of any pages except the home page, it won't load (404 error). Please can you help me? What could I have done wrong?
@@joshuaabulu9 His issue was with his hosting provider, if your problem is only occurring when accessing the live version of the site then it's probably a routing issue that you need to fix on your hosting platform. By default, most hosting providers use a directory based routing system that will conflict with dynamic JavaScript based routing which is what React uses. You need to configure the routing to simply always redirect to the index page (In other words, the "yourdomain.com/" route).
@@TrevoltIV Thank you I just did it Initially, I hosted the site on render, but it kept returning 'not found' when I try to go to a sub page directly from the URL It was the same issue with netlify. But netlify has a fix by adding a _redirects file to the public folder and adding a code inside that looks like this '/* index.html 200'.. now on netlify, it works, but still doesn't work on render
That could be for a variety of reasons. First of all are you building it and then trying to run it on a host provider? If so, the problem might be that they have pre-determined server side routing that you have to use instead of React Router (or in combination with).
@@TrevoltIVthanks. You explained very well btw 🙏🏻 . I subbed
2 месяца назад
Hi, what is the extension you used to have the suggestion and auto complete for the React like in the videos? I tried some extensions but it cannot recognize the structure like your one which is helpful
I want to connect two different react apps and use them in the same page (I have a home app and login app and ı want when I click the link in home page go to the login app) how can I do this ? Please help me
I’m not sure why you’re separating the apps but the easiest way I can think of to do that is to just put them online and link over to the other domain or add a route via your hosting platform for that separate index path.
Post request handling is not possible without server side rendering (like NextJS). The problem is that your React code is running client side, not server side. If you use something like Next.js, you can handle server side operations right in your React code. So either use a get request instead or learn Next (or create your own web handler using PHP or Java, but I doubt you want to do that).
That is not working for me :-/ i normally use vue js and i am trying to learn React and if i put a file in a pages folder I cannot display it on the screen .. thanks for the video though
Hello my friend : I need some help. I am working on an application that, when pressing the button, will go to the control page of the router connected to it on the Wi-Fi network. I need the code for the button that will raise the user of the application to the page of the router connected to it by taking the IP Gateway address according to each router separately. Can you help???
You're gonna have to store all the IP's or something for various routers and then either make user type in the router or design some system to detect it somehow.
do we have to type /home,/contacts all the time to navigate to those pages ? Can't we make them clickable like we do in vanilla html,css,js with anchor tags ?
You could use normal anchor tags but this way you'll end up refreshing the whole page whenever you're navigating. Its recommended to use the from React Router Dom it works pretty much like a normal a tag but doesn't refresh the page every time you navigate to a different page, giving you that SPA feel.