A little hack in react-router-dom

On the current project, I encountered a bug.
In component i have 2 links they implement with <Button> component with type="link".
Something like this.

//component.tsx
<Button type="link" onClick={someMethod} size="someSize" className="someClassName">Button text</Button>

And with this implementation we have bug with css, which stem from antd standart styles.
I decide to rewrite this part of code with <Link> component. But(!) as you can see in the code above i call someMethod on click button. It's important. Firstly i rewrite like this

//component.tsx
<Link to="" onClick={someMethod} size="someSize" className="someClassName">Button text</Link>

Look's like something that working correctly, but it is not. I explain it.
For example u are on the localhost:3000/someUrl. when u click on link u for short time will redirect to="", and depending on the project settings it can work in the difference ways. In my project it work like this:
I on localhost:3000/someUrl click on the link and get to the page localhost:3000/login for ±0.3 sec and after it worked method someMethod(). This is not acceptable!
What I do? In to i pass not "" i pass "#" and everything worked as it should.

BTW, I forgot to write version of react-router-dom, it' "react-router-dom": "^5.0.1",

Alexandr