Open efoken opened 2 years ago
Interesting, I have been reading the new React hooks and there is a big difference in Atomico and React task management
Atomico manages tasks like islands (webcomponent), so Atomico does not group tasks into a global funnel like React does.
This allows Atomico to render faster because components don't block each other. Another benefit of this is SSR hydration, as each component is hydrated when assembled.
I will review the new hooks in more detail, to understand their behavior well, I think that if it is possible to support useId and useInsertionEffect in the next version, I will work on them.
the challenges are:
useId
(React) useId is a hook for generating unique IDs that are stable across the server and client, while avoiding hydration mismatches.
useInsertionEffect, require modify render cycle
I will keep you informed on this issue
React 18 introduced 5 new hooks which should be added to Atomico:
useTransition
useDeferredValue
useId
useSyncExternalStore
useInsertionEffect
As we share some code between React Native and Atomico, it would be nice to have the new hooks available. At least I wanted to use
useId
anduseInsertionEffect
which should be pretty easy to add I guess.