Skip to content

Opting out of async dom updates #700

Open
@SCLeoX

Description

@SCLeoX

We have recently updated preact/signals from 1.3.0 to 2.2.0 and noticed a lot of UI started to flickering. Upon close inspection, we determined this to be the cause: #604. Sorry I cannot share code, but for example:

We have a tooltip component whose layout (width, height, x, y) is controlled by signals. We update the signals on ResizeObserver trigger. However, since now DOM updates caused by signals are triggered one frame after, the component will now be rendered with incorrect dimensions for one frame, then immediately fixing itself to the correct size, resulting in a jarring experience.

This is just one example, and I am sure I can fix this specific case by switching out of signals, but we have a couple more complex components that are now flickering (mostly our own windowing UI framework), and it is not super easy to fix due to their complexity,

We really don't want stay outdated. Thus I am wondering, is this something that can possibly be opt-outed of? Or is it core to the preact signal and cannot be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions