deephaven/deephaven-plugins

ReactPanel - ErrorBoundary key prop is causing unnecessary re-mount

Closed this issue · 0 comments

The ErrorBoundary inside of ReactPanel is causing mount / unmount any time children changes. This is causing some flickering / re-rendering whenever state changes in a ui component.

Minimal reproduction (click the button to see table flicker)

from deephaven import empty_table, ui


_simple_static = empty_table(2000).update_view([
    "String=new String(`a`+i * 1000)",
])

@ui.component
def ui_flicker():
    value, set_value = ui.use_state()

    def on_click():
        set_value('flicker') 

    return ui.button(
        "Flicker",
        on_press=on_click
    ), _simple_static


my_flicker = ui_flicker()