Navigating to a fragment changes URL unexpectedly

41 Views Asked by At

I have a url that looks like:

localhost:8080/some-resource/id

And a link that looks like:

<a href="#my-section">
    Section
</a>

I would have expected that clicking this link would result in a url that looks like this:

localhost:8080/some-resource/id#my-section

But instead I'm getting:

localhost:8080/#my-section

Is this expected behavior? (By the way, I'm using ReactJS)

0

There are 0 best solutions below