React 2021 HashRouter - Episode 13

preview_player
Показать описание
This is the thirteenth episode of the Learning React in 2021 Series.
This episode discusses React Router's HashRouter and how it differs from BrowserRouter and why you might care about the differences when it comes to external hosting of your React site.

Рекомендации по теме
Комментарии
Автор

You explained this so well, tyvm. Came across and needed this. When using a react-router project that is solely frontend and putting it up in gh-pages, you can't hard refresh on the inner links, HashRouter solves that.

TJDRZ
Автор

Great! Finally it really works on real hosting thanks to you!

the_sleepy_gaming
Автор

For a long time I looked for the answer, and thanks to you I found it. Thank you very much!

gustavomendoncadossantos
Автор

Hi,
I'm looking for some suffix route after the base URL like How can I load the React app by default to localhost:3000/custom once the server is started? Please help. Thanks.

suhasrm
Автор

You just nailed it. Thank you so much!

I'm about to host a react site on a shared hosting. Do you think there are any downsides to this?

austintochukwuasoluka
Автор

Thanks for the content, after 4 videos, I finally understand the topic

churupitaa
Автор

Thank you, I have a question. After deployment my react website has 404 errors when I try to refresh, it's only frontend app, no backend. Would you recommend me to use hashRouter instead of BrowserRoute? Should it fix the issue?
Thanks in advance.

ol
Автор

Thank You so much !!! i was stuck for a while there !!!

haseebqureshi
Автор

Thanks for this video, solved our big issue

marwanekhalfaoui
Автор

Is there any other change we need to make when switching to HashRouter? I changed my BrowserRouter over to HashRouter, but now my various components are no longer displaying.

matthewhawkins
Автор

In which cases you avoid HashRouter? Possible issues?

mytvhome
Автор

Hey thanks for the tutorial. I have a question I am using react router v6 and I want to remove this # from the url anyhow.

Thanks in advance 😊

thehkmalhotra
Автор

Someone told me a while ago that "it just looks nice" to my question why are you using it. I just went and implemented it.
Now I just finished implementing oauth2 into phpmyadmin but I ran into a problem when trying to get my token's from the callback url. The redirect url used the hashtag instead of the questionmark, PHP is incapable of seeing the hashtag while Javascript does not.
'Oooohhh so that's why this works so good with React on any server, it's never another page but just a "scroll" 🤣'
Good thing the Auth server let me change the response to query params.

Stoney_Eagle
Автор

if i want to use basename in hashrouter (react-router-dom v6), i get an error, how can i correct that error? i have been searching like i can handle it but i couldn't handle it

signo
Автор

hey steve, how can i do to include # after basename

hlaingminaung
Автор

is there an option not to include /#/ ?

PrakashSubba-usll