bradtraversy / lead_manager_react_django

Full stack app with React, Redux & Django
592 stars 316 forks source link

Using BrowserRouter instead of HashRouter #21

Open chauser10 opened 4 years ago

chauser10 commented 4 years ago

Any problems associated with a HashRouter vs BrowserRouter like you used in this tutorial? In the react-router documentations it recommends making the server compatible with BrowserHistory over HashHistory. I was able to get this working by using re_path(r'^(?:.*)/?$', include('frontend.urls')) at the end of urlpatterns in the leads.urls. This way index.html is always loaded by default if the URL doesn't match anything else. I am curious if this is worth doing or if HashRouter is the way to go.