I need to redirect to a completely new application when I click on a button in my app. This means that from URL: localhost:8080, I need to be redirected to stackoverflow.com
If I use <Redirect to="stackoverflow.com"/>
I get this: http://localhost:8080/https://stackoverflow.com So it attaches the new address to the old one, and what I need is to redirect me to stackoverflow.com.
Is there a way to do this using Redirect component from react-router? Thanks.
Asked
Active
Viewed 21 times
0

picaCHuXX
- 91
- 7
-
Just use anchor tag? – anttud Oct 15 '20 at 11:23
-
I was wondering if I can use this Redirect component or some other component from react similar like Redirect. – picaCHuXX Oct 15 '20 at 11:26
-
1Does this answer your question? [React-Router External link](https://stackoverflow.com/questions/42914666/react-router-external-link) – anttud Oct 15 '20 at 11:27
-
it does not, because non of the suggested solutions is what I was looking for, but thank you anyway – picaCHuXX Oct 15 '20 at 13:51