Question · JavaScript and React course · Module 6: React Router
BrowserRouter vs HashRouter
What is the main difference between BrowserRouter and HashRouter?
Answer options
- BrowserRouter only works in production, HashRouter in development
- BrowserRouter uses the HTML5 History API, HashRouter uses hash (#) in the URL
- HashRouter is faster than BrowserRouter
- There is no difference, they are aliases for the same component
You can check the correct answer by solving this task in the CodeWorlds game.