Open DannyDelott opened 5 years ago
Hmm you can just have a onclick to dispatch a redux action which navigates you where you want to go.
The issue is users will expect to be able to right-click and open in a new tab/window, which requires href
.
If it’s mapped in routesMap, won’t it just open them to the right location?
Not sure what you mean. Here's the user distinction I'm referring to:
With href
, the browser (chrome) provides options for opening the link in a new tab. The onclick
would just open the link in the current window every time.
href |
onclick |
---|---|
We use a component library that provides lots of interactive components like Buttons, MenuItems, etc.. which take an
href
prop and create<a>
elements in the DOM.<Link>
is great for when we just want simple links, but is there a recipe for getting raw href strings out of RFR so we can pass them to other kinds of components that provided linking functionality?