React js 18 Suspense on an enterprise codebase and it's caused nothing but confusion
I'm really not a fan of Suspense tbh, I've worked with it a bit on an enterprise codebase and it's caused nothing but confusion. Using throwing/swallowing exceptions as a way to achieve behavior is super implicit and arguably a code smell. You can't identify that a component might be using that behavior without looking at its internals. Even Context (the other arguably implicit dependency injected thing) still has to pass a default value if a parent context isn't found. And there's been a bunch of edge cases which it doesn't handle particularly well, e.g. pagination based loading, or needing to show multiple loading indicators. It just adds more coupling for (IMO) something that wasn't that big of a problem in the first place.
Throwing exceptions was so counterintuitive one guy just gave up and wrote his own framework
This is what drives me a little crazy about Facebook - a constant disregards to "standards" in almost every form and never contributing to existing open source projects.
Using throwing to manage suspense? Ugh. There are way better functional approaches over using an anti-pattern to the core language. But Facebook drops a turd and it is worshiped by so many.
Don't get me wrong. I appreciate what React brought everyone when web components were a stalled standard. There are parts of React that are totally great. It isn't the fastest, it isn't the easiest, it isn't the best by any means - but React is a solid lib. Of course, it is the only largely used lib that doesn't properly support the finalized web component standard.
I would really like to see the greater community adopting web components. Even with a lightweight wrapper like Lit, Stencil, etc... that can then be used in React, Vue, Angular, and everywhere else. It is far past time that we have UI component libs like Material-UI and Vuetify that aren't just pure components that can run in either space. Of course, Google does have their own material components that can do this - only Google has been really shit at maintaining and promoting their own web components.
Ahh well. One day...