jasonmlutz / winner

Full stack survey app
0 stars 0 forks source link

Improved link handling #19

Closed jasonmlutz closed 2 years ago

jasonmlutz commented 2 years ago

The current model of triggering navigation with onClick={navigate(foo)} does not allow the link to be link-like; e.g. you cannot open the link in a new tab or window.

Possible solution: Since the rails routes knows what to do with every un-caught route, and the App router does too, we can use <a> tags for navigation. Downside: more api calls with this method.

Related: #4.

jasonmlutz commented 2 years ago

Better solution: Use <a> tags with preventDefault() so that the link looks like a duck and quacks like a duck but is in fact a goose.