3 ms·
Except that it's not just like a normal link. It's a button dressed up as a link. A translinkingbutton, very current in this this time of age, I hop I don't off
by jbverschoor 4y ago
Except that it's not just like a normal link. It's a button dressed up as a link. A translinkingbutton, very current in this this time of age, I hop I don't offend any buttons.
What happens if you press shift? or cmd? and in which browsers / OSes? What if you use enter to open links, will it have a tabstop? What about accessibility. You're in essence re-creating the many parts of the webbrowser.
> The hate for single page apps is about bad ones. Which are unfortunate common
That's the same reason people hate php and c++
You can make great things with both..
- Gigachad 4y agoIt’s not a button. It’s an actual a tag with a href. Additionally it has an on click handler. If you open the link in any way other than clicking, it uses the href like a normal link. Things like React Router make it trivial to create real links that additionally can change the page without a page reload if they are clicked. But you can still middle click to open in new page, still hover to see link, still navigate history normally, etc.
- jbverschoor 4y agoIf and only if it hadn’t been mutilated, which happens about 99% of the time. And the whole point of this. Sure you can make this work, but people don’t put in the extra hours of education, research, implementation, and testing
- curtisblaine 4y agoYou don't really seem to understand how the History API works. They're normal anchors that have an handler attached. When the handler is executed, the transition to another page is handled client-side. If you open the link in another page, or bookmark, or deep link in any other way, the SPA loads in its entirety and shows the right content anyway. Most of the time, with lazy loading and caching, the actual number of bytes on the wire is less than serving a whole server generated page of content.