> when navigating to a new screen, it's better to show a loading state as soon as you can (often a skeleton UI), rather than delay the transition. In a better language, this would be the programmers choice on a case-by-case basis, with no need for the higher-ups to break or fix everyone's behaviour at once. Either return a Page(Future(Components)) or a Future(Page(Components)).
React 19 Breaks Async Composability
51–60 of 114 posts
Re: React 19 Breaks Async Composability
#52Earlier quoted context omitted.
I have a harsher take, 95% where react is used it is used without the need.
Prior to React, most developers just invented a strategy for structuring code on the client side. What’s your preferred alternative?
You want a good example of how a non-react website and its code might be structured, look at GitHub. At least from a user perspective, I've never had a problem using the back button or ctrl-clicking links while navigating GitHub - which is not something I can say of most other React and heavy-js websites.
Re: React 19 Breaks Async Composability
#53Kinda new this day was coming, sad to see it actually happen
Re: React 19 Breaks Async Composability
#54> when navigating to a new screen, it's better to show a loading state as soon as you can (often a skeleton UI), rather than delay the transition. In a better language, this would be the programmers choice on a case-by-case basis, with no need for the higher-ups to break or fix everyone's behaviour at once. Either return a Page(Future(Components)) or a Future(Page(Components)).
Or better yet, just... Navigate to a new (real) web page? Maybe passing some state via URL parameters? At least then the back button has a reasonable chance of working correctly.
Instead of a choice between progressively loading in /page-a or waiting for /page-a to fully load before showing it, just direct the user to /page-b instead?
Re: React 19 Breaks Async Composability
#55I find it fascinating how frequently the best practices change, and how dogmatically people still want to follow best practices. As an industry, we spend absolutely incredible amounts of work refactoring working code into the new paradigm.
I have a harsher take, 95% where react is used it is used without the need.
Re: React 19 Breaks Async Composability
#56Earlier quoted context omitted.
Prior to React, most developers just invented a strategy for structuring code on the client side. What’s your preferred alternative?
React isn't a way of structuring code though. It's a whole (huge) framework dedicating to making web apps/pages. And most of the time it seems to be used to replicate functionality that the browser can already natively do (for example, navigating to another page). You want a good example of how a non-react website and its code might be structured, look at GitHub. At least from a user perspective, I've never had a pro…
That's.. basically every lib. Welcome to abstractions.
Re: React 19 Breaks Async Composability
#57Earlier quoted context omitted.
Hooks make it easy to compose logic and effects. The actual implementation has some serious warts but the fundamental idea is great. The React compiler looks like it will eliminate a lot of the error prone manual dependency tracking that usually trips people up with hooks.
I didn't like hooks from the get go because it was the first time I found the automagical behavior that web dev was somewhat leaving behind starting to creep back in. It's insanely hard (nigh impossible?) to debug an aging app that has use useEffect's and useState's everywhere. (This wasn't the case with the class components (not suggesting that class components were the be and end all)) Now the Compiler sounds nice,…
I think we still just haven't figured out how to build a UI toolkit that is both highly expressive to use and performant for complex UIs.
I think there are some really great ideas in hooks but it might take a new language built around them to make them truly ergonomic. The React compiler is a step in that direction.
Re: React 19 Breaks Async Composability
#58Earlier quoted context omitted.
It makes anything that does lazy loading in parallel noticeably worse by forcing waterfall-only loading, in order to make rendering and management of loading states slightly better.
What does 'rendering' mean in non javascript terms? I have a feeling it means 'generate html' in english.
Re: React 19 Breaks Async Composability
#59Earlier quoted context omitted.
In that regard, my experience has been the following churn scale: JavaScript churns more than Rails which churns more than Elixir/Phoenix. I believe this is caused by “how sound the fundamentals are” (technical debt in the language itself and its stdlib).
PHP devs meanwhile: You guys churn? For better or worse, you can take 10+ years old PHP code and it'll mostly just work.
Re: React 19 Breaks Async Composability
#60Terrible shitshow. Web dev is all broken and horrible. Well at least the popular stuff is. No idea why anyone uses this outside resume building.
HTMX is the way forward.
Besides, HTMX is just HTML with JS on top which devs have been doing for literally 20 years. Rails had that kind of functionality in 2005 because I remember using it.