Routing using <Link> and <Navlink> did not work properly as if the history did not sync into the browser.
Steps to reproduce
Steps to reproduce the behavior:
Issue the yarn cleanAndSetup command in the CLI to remove the default example of the boilerplate.
In <Home /> component create link like a sidebar navigation menu.
Create two components within the <Home /> component that serves as a separate pages something like in the screenshots section below. See screenshot 1.
Notice that in the browser when I click the link of Driver Logs the display is not what I expected. See the screenshots section below. See screenshot 2.
Expected behavior
It should display the expected page based on what I desired to click.
Work Around
To work around this issue, what I did was I remove the <BrowserRouter> component in the src/app/index.tsx and move it in the src/index.tsx like in the screenshots section below. See screenshot 3. And it works just fine, see screenshot 4.
Description
Routing using
<Link>
and<Navlink>
did not work properly as if the history did not sync into the browser.Steps to reproduce
Steps to reproduce the behavior:
yarn cleanAndSetup
command in the CLI to remove the default example of the boilerplate.<Home />
component create link like a sidebar navigation menu.<Home />
component that serves as a separate pages something like in the screenshots section below. See screenshot 1.Expected behavior It should display the expected page based on what I desired to click.
Work Around To work around this issue, what I did was I remove the
<BrowserRouter>
component in thesrc/app/index.tsx
and move it in thesrc/index.tsx
like in the screenshots section below. See screenshot 3. And it works just fine, see screenshot 4.Screenshots 1.
2.
3.
4.
Versions