Closed ChaoqiYin closed 6 months ago
useEffect in owl is invoked synchronously after patching so effectively all effects are layout effects. However since rendering in owl is asynchronous, you can't schedule a render during an effect and expect it to be patched again before the animation frame. But if you do any imperative manipulation of the DOM in an effect/onPatched there will be no flickering.
We have been evaluating allowing scheduling synchronous render/patch cycles in effects but as this is a major breaking change it's unlikely to land without an upgrade in major version.
Closing this issue as resolved but of course feel free to ask clarifying questions on this issue.
Sometimes we need to do some extra styling, but at the same time we need to avoid page flickering。