J
J
JS Noob2020-01-30 23:01:24
React
JS Noob, 2020-01-30 23:01:24

What is the difference between Router and BrowserRouter from the react-router package?

I tried to use both components, but did not understand what is their fundamental difference? Maybe I missed something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Hecc, 2020-01-31
@JS_Noob

Router supports custom history, which is sometimes needed to work with redux and mobx, and BrowserRouter uses the HTML5 history API.
In all other respects they work the same.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question