4 ms·
What you say would actually indicate that yes, it is React'a fault, would it not? It's not possible to flash misinformation with normal front ends before React
by epistasis 3y ago
What you say would actually indicate that yes, it is React'a fault, would it not?
It's not possible to flash misinformation with normal front ends before React, without going to extreme extra effort to enable such misbehavior. Whereas with React, the easiest programming path is the user hostile path. And React is adopted only to make it "easier" on programmers.
- efdee 3y agoI have no idea what would make you say such things other than a deep, unrational hatred for a framework. Nothing about React specifically enables that kind of design.
- ipaddr 3y agoReact router encourages this design. Hard to blame react when angularjs started the trend many years ago.
- efdee 3y agoWhat makes you feel that react-router encourages this?
- deleted 3y ago[deleted]
- Izkata 3y agoAsynchronous data loading is the core of the problem. React without any other addons like redux, where state is dumped into the page and just passed down through props would avoid the issue (though it can have a different one where the page is blank for a moment before the javascript renders the page). Same with HTML and no frontend framework, it's all loaded synchronously with page load so there's no "empty data" state. Redux encourages loading data like that, and the easy way to use Router makes it easy to do that - all URLs get sent to the same backend view to render the app, then the frontend takes the URL args and triggers ajax to get the data. During that interim when the ajax is running is when you get this empty-data state.
- efdee 3y agoThe overhead is only the latency of the ajax call on the first load (since you are going to the server to fetch the app code, then going to the server again to fetch the data, instead of going to the server and fetching the app code + the data). For every consequent page transition the performance is actually slightly higher than a full page load since (a) you're probably only fetching JSON instead the entire resulting rendered HTML and (b) you don't have to load the app code any more.
- ctvo 3y ago> It's not possible to flash misinformation with normal front ends before React jQuery, Backbone, Angular, etc.. You can / did do this in other frameworks prior to React. I think, from reading your comments, you think client side routing and single page applications equals React. That's... an interesting take.
- epistasis 3y agoWith jquery, you'd have to put in a lot of work to do this. And I'm not a front end engineer, so I went from knowing enough jquery to be dangerous to doing React tutorials, where I saw how the design of this system was enabling bad default behavior. If my irrational hatred has a better target than the term "React" I would like to know it. I do despise the usability of nearly every SPA I have used. It is perhaps possible to program an SPA so that the deficiencies are not noticed, which is great, but that does not appear to be the norm nor is it made easy by SPA frameworks.
- ctvo 3y agoIt's a state issue. The flash of inconsistency you see is because the client eagerly modifies state before the server persists it (or some form of this problem). The routing issue is because the application (SPA) is using business logic to control the browser's navigation state. Sometimes opening a modal will be a new push on to the nav stack so you can hit back, sometimes it isn't, sometimes they forget things, etc.. All of it though is just too much state being managed on the client by the application and that state being managed poorly. This isn't only related to React. It's always been possible to screw up with managing state in any framework.
- epistasis 3y agoExactly, the framework changes static data display into "state" which is something that should be avoided unless absolutely necessary.