▲ | fvdessen 2 days ago | |
Because app navigation is not linear like the url history. Think of a popup with tabs within a page. There's the navigation within the popup, and the navigation within the page. When you close the popup, you don't want 'back' to bring the popup back, you want it to go to the page before the popup. This is hard to replicate with just urls and server side rendered html. Also you don't want that store server side because there can be multiple parallel tabs and you don't get notified server side when the tab is closed to properly cleanup the associated resources. | ||
▲ | withinboredom 2 days ago | parent [-] | |
This is why we are cooked. Just because you can, doesn’t mean you should. ?tab[0]=/some/url&tab[1]=/some/resource&activeTab=0 Bam, you have tabs in the url. I can duplicate the tab, share my view, or whatever. Assuming the other user/tab/window/profile has access to these resources, it’ll show exactly the same thing. I can even bookmark it! You can even add popups: ?popupModal=saveorleave This state probably won’t be applied on an entry, but what’s great is that pushing [back] in the browser is the same effect as cancel! If you click “leave” then you do a “replace state” instead of a “push state” navigation, so the user doesn’t go back to a modal… This was, at one point, decently standard logic. Then people who don’t know how browsers work started creating frameworks and reinventing things. I digress. I’m just so glad I left the front end 15 years ago, I’d lose my shit if I were dealing with this kind of stuff every day. |