|
|
|
|
|
by chrismorgan
1492 days ago
|
|
> event.metaKey || event.ctrlKey This misses event.shiftKey. All keyboard modifiers disqualify client-side routing. As for <Link> in its entirety, where you have to use a special component which becomes a link and adds a click handler to it, I think this is generally the wrong solution: it’s better to instead put a single click handler on the entire document to intercept clicks on links. That way, you can just use normal links everywhere and it just works, rather than having to remember to use a whole separate component every time which may or may not be able to pass through the required properties or attributes (e.g. this one only supports class and href). Simpler, smaller and cheaper. |
|