News for hackers. Stuff that matters.
Re:Things you forgot because of React by robertoandred on Tuesday August 15, 2023 @11:47PM (#37142651)
And why does a backend engineer's point of view on frontend state management matter? Why is a variety of options and strategies for different scenarios ok for the backend but not for the frontend?
Re:Things you forgot because of React by ttfkam on Wednesday August 16, 2023 @08:59PM (#37155848)
The frontend has… a browser. It's a much more constrained toolbox. You are forced to use JS and whatever browser APIs made available to you.

The server side is only limited by what can run in a datacenter. Any language. Any service type. Any scaling profile.

Neither is more "correct". Both have pros and cons. As for why the backend engineer's point of view matters: if you are server-side rendering, you will have a better chance of going faster. A browser will always render HTML faster than JS that generates HTML on the fly, and the server side can always be made to generate HTML faster than a browser could. You can always simply throw more hardware on the server side to speed this up whereas you have basically no control over the performance profile of a random user's browser.

Look at Google search results. It's typically not JSON over AJAX; it's rendered HTML dropped into place. Why? Because every millisecond can be quantified into gained/lost revenue.

Re:Things you forgot because of React by robertoandred on Thursday August 17, 2023 @11:56PM (#37171245)
So why is it bad to choose a frontend state management strategy in a way that maximizes revenue?
Re:Things you forgot because of React by ttfkam on Friday August 18, 2023 @09:02AM (#37175057)
> Neither is more "correct". Both have pros and cons.

I think frontend state management is a completely legitimate choice if it fits your use case.