Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
posterus
Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
imo the biggest shortcomings are reacts inability to mutate its own static view without having to go through diffing and hooks again, this rfc in particular is what i've been waiting for so, so long: https://github.com/facebook/react/issues/18499
Generally, attempting to detect object changes is more error-prone that just updating things immutably. For example, Vue uses setters, which results in various gotchas (e.g. array[0] = value won't be detected), and will use Proxy in v3, which is more reliable but impossible to polyfill and can cause performance issues in some cases. Immer also works with proxies. I guess this is subjective, but one of the reasons I like React is that it makes immutable updates completely transparent and doesn't do any brittle change detection magic under the hood.
We specifically use useLayoutEffect because we need to execute subscription handling in the commit phase. useEffect runs on a short timeout, and it's possible to miss dispatched actions that might have occurred in between. In fact, at one point we had a bug where we were accidentally using useEffect under React Native, and that caused user apps to break (see https://github.com/reduxjs/react-redux/releases/tag/v7.1.2 and linked issue).
https://github.com/mitranim/posterus#taskdeinit
I never got a single comment at on RFC PR so it never went anywhere. ¯_(ツ)_/¯