You would have also showed how to deploy using git because deploying manually becomes hectic and we want whenever there is change in codebase it should be continuously deployed automatically. I am able to do it using git but there is configuration issues so...
Can u help me ? i deploy my project is ok but just login with google is error when redirect to home "Page Not Found Looks like you've followed a broken link or entered a URL that doesn't exist on this site."
If your project is working on the home page and you get page not found for other page, then the issue may be in the application not in deployment. Try to check that and correct me if i understood different.
Thanks so much - I spend almost a full day watching other videos and none of them worked for me - but yours did and it is so easy. The only thing is that my image is not showing up ( I tried putting it in the images folder, then the public folder and finally the dist folder - but it is not showing up - yet it DOES show up on my localhost:5173 browser and same with my favicon - works on my localhost:5173 browser but not on my deployed project when I open it in netlify - any ideas what I am doing wrong?
The issue of useParams not working when deploying a React app on Netlify often stems from how the React Router and Netlify handle routes. React is a single-page application (SPA), meaning routing is handled client-side, but Netlify (or other static hosting services) doesn't inherently understand client-side routing. It tries to serve the paths directly from the server, which results in a 404 error for any routes other than the root (e.g., /). Here’s how to fix it step by step: 1. Create a _redirects File Netlify uses a _redirects file to define custom redirect rules. You need to redirect all routes to your index.html, so React Router can handle them. Steps: Create a file named _redirects in your public folder. Add the following line to it: /* /index.html 200 This tells Netlify to serve index.html for all routes, ensuring that React Router takes over routing. Deploy your app again, and your routes should work now. 2. Use netlify.toml (Alternative to _redirects) If you prefer or already use netlify.toml for your configuration, add this to the file: [[redirects]] from = "/*" to = "/index.html" status = 200 This achieves the same effect as the _redirects file. 3. Debugging Tips Ensure React Router Setup: Make sure you are using React Router properly and that useParams is implemented in a route component. For example: import { BrowserRouter as Router, Route, Switch, useParams } from "react-router-dom"; function App() { return (
); } function UserPage() { const { id } = useParams(); return User ID: {id}; } Check the useParams Hook Usage: Verify you are calling useParams within a component rendered by Route. 4. Verify Deployment Settings When deploying to Netlify, ensure that: You are selecting the correct build folder (e.g., build for Create React App). Your app builds successfully without any errors. 5. Test Locally Run your project locally in production mode to ensure it works before deploying: npm run build npx serve -s build Visit the routes locally (e.g., /user/123) to confirm that routing is functioning correctly. By following these steps, your deployed React app on Netlify should handle routes properly, and the useParams hook will work as expected.
Hey thanks.. this my first project deployment .. and did it successfully with your video..
Great. Keep it up❤❤❤
Thanks man yaar, only your method works on RUclips others are just waste.
❤❤❤
Great video bro, it's working very faster, very efficient and very effective. Thank you so much
❤❤❤
Nice and clean, thank you so much!
❤❤❤
Give you 5 out of 5 star man, such a great!! video🧡🧡
Thank you so much❤❤❤
Awesome it really works thank u
❤❤❤
🔥 much appreciated
❤❤❤
Hey thanks u solve my problem
❤❤❤
Thank You ❤
❤❤❤
2:35 You already said this only. Then what is the purpose of showing the same sentence with annoying music.
Sorry for that
You would have also showed how to deploy using git because deploying manually becomes hectic and we want whenever there is change in codebase it should be continuously deployed automatically.
I am able to do it using git but there is configuration issues so...
I will make tutorial on that also
Deployed but after loading 1 second not show anything.. Why..??
You don't get anything after deployed?
Can u help me ? i deploy my project is ok but just login with google is error when redirect to home "Page Not Found
Looks like you've followed a broken link or entered a URL that doesn't exist on this site."
If your project is working on the home page and you get page not found for other page, then the issue may be in the application not in deployment.
Try to check that and correct me if i understood different.
Thanks man
❤❤❤
Thank you yr ❤
❤❤❤
Thanks so much - I spend almost a full day watching other videos and none of them worked for me - but yours did and it is so easy. The only thing is that my image is not showing up ( I tried putting it in the images folder, then the public folder and finally the dist folder - but it is not showing up - yet it DOES show up on my localhost:5173 browser and same with my favicon - works on my localhost:5173 browser but not on my deployed project when I open it in netlify - any ideas what I am doing wrong?
Maybe you can check the path of your images, if they are showing or not.
@@CodeBlessYou Thanks - yes I have it right now - thanks so much for being so generous with your time
@@livelivelive2548 Thanks for watching😀❤❤
thanks sirr.....
Thanks very much, sir
❤❤❤
Deploy successfully and run successful but why any images was not showing
Copy your image URL and paste it in the browser new tab and check it is working or not
Thanks bro
❤❤❤
After deploy we get blank white page please helpme
My project on localhost it's work fine but in deployment it's shows blank page
May be you are getting some error. Check in console.
I don't have dist folder. Instead I've build folder
Upload that build folder :)
Why i t no Work on Routers (use in app)
when I deploy React app with Netlify but useparams is not working, Could you help show this error?
The issue of useParams not working when deploying a React app on Netlify often stems from how the React Router and Netlify handle routes. React is a single-page application (SPA), meaning routing is handled client-side, but Netlify (or other static hosting services) doesn't inherently understand client-side routing. It tries to serve the paths directly from the server, which results in a 404 error for any routes other than the root (e.g., /).
Here’s how to fix it step by step:
1. Create a _redirects File
Netlify uses a _redirects file to define custom redirect rules. You need to redirect all routes to your index.html, so React Router can handle them.
Steps:
Create a file named _redirects in your public folder.
Add the following line to it:
/* /index.html 200
This tells Netlify to serve index.html for all routes, ensuring that React Router takes over routing.
Deploy your app again, and your routes should work now.
2. Use netlify.toml (Alternative to _redirects)
If you prefer or already use netlify.toml for your configuration, add this to the file:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
This achieves the same effect as the _redirects file.
3. Debugging Tips
Ensure React Router Setup: Make sure you are using React Router properly and that useParams is implemented in a route component. For example:
import { BrowserRouter as Router, Route, Switch, useParams } from "react-router-dom";
function App() {
return (
);
}
function UserPage() {
const { id } = useParams();
return User ID: {id};
}
Check the useParams Hook Usage: Verify you are calling useParams within a component rendered by Route.
4. Verify Deployment Settings
When deploying to Netlify, ensure that:
You are selecting the correct build folder (e.g., build for Create React App).
Your app builds successfully without any errors.
5. Test Locally
Run your project locally in production mode to ensure it works before deploying:
npm run build
npx serve -s build
Visit the routes locally (e.g., /user/123) to confirm that routing is functioning correctly.
By following these steps, your deployed React app on Netlify should handle routes properly, and the useParams hook will work as expected.
@@CodeBlessYou Thank you for your help
@@vuthysay ❤❤❤
How does your display look so sharp??
I think because of recording :)
can you make github series please
Currently I am working on Git course. You can register for FREE - forms.gle/2c7BkHaFXgitfpwE6
server side don't work
for netlify?
@@CodeBlessYouyes
@@CodeBlessYouIn my project, it is on the server side, the client side is working, but the server side is not
@@fuzulieliyev2810 You have to deploy server separately
Is there a maximum size limit for megabytes for that?
I think Yes. There is limit but I am not sure.
After deploying it showing an empty white page. Please help me.
Did you check the status of your deployed site?
[[redirects]]
from="/*"
to="/index.html"
status=200
❤❤❤