
"The Activity component lets developers break UIs into named 'activities' that can be conditionally rendered or suspended. Traditionally, a developer could use conditionals to hide or show a component, for example: Instead, the new Activity component can be used: The new component supports visible and hidden modes, enabling finer control over UI segments. Activity will enable developers to pre-render components while hidden from users."
"A new useEffectEvent hook provides a mechanism to decouple the event portion of useEffect logic into a separate hook. This is useful when developers have an effect that uses a value but should not re-run when that value changes. With useEffectEvent, any values referenced within the event are not required to be used in the dependency array in the useEffect."
"There has been mixed feedback on the introduction of useEffectEvent, with a user commenting on X that React is trying to solve problems inflicted on itself and another that they have created a whole new hook just to fix a linting rule. A React core team member has replied to some of these criticisms, arguing that it is not just a React problem, and all reactive models have ways to opt out of reactivity, citing 'untrack' examples from other frameworks."
React 19.2 adds first-class primitives for activity control, effects, and signal caching, and includes server-rendering enhancements and other performance improvements. The new Activity component lets developers break UIs into named activities that can be conditionally rendered or suspended, supports visible and hidden modes, preserves state while hidden, and allows pre-rendering of hidden components. The useEffectEvent hook decouples the event portion of useEffect logic so referenced values need not be included in useEffect dependency arrays, and eslint-plugin-react-hooks has been updated to support the change. Reactions to useEffectEvent are mixed, with critiques about creating new hooks and responses defending opt-out patterns in reactive models.
Read at InfoQ
Unable to calculate read time
Collection
[
|
...
]