useRenderEffect
useRenderEffect(compute, apply?) belongs to the render phase.
useRenderEffect(compute, apply?) belongs to the render phase. It runs synchronously when created and, on every flush, before any useEffect. The DOM bindings that the compiler generates are render effects. Application code rarely needs it; it is the right tool for code that must have applied its change before user effects look at the result (a library that writes to the DOM, for example). @shadow-js/web exports the same primitive as effect.
Both forms exist: useRenderEffect(fn) tracks everything, useRenderEffect(compute, apply) tracks compute and runs apply(value, previous) untracked.