dash icon indicating copy to clipboard operation
dash copied to clipboard

Unexpected re-rendering

Open valentijnnieman opened this issue 6 years ago • 3 comments

I wanted to document some findings around dash-renderer and the possibly unnecessary re-rendering I think it sometimes does.

I've noticed that the TreeContainer's shouldComponentUpdate method does not do what we think it does - even when returning false it still renders. Logging the result of the logic in shouldComponentUpdate and logging in render() looks like this: screen shot 2019-02-07 at 1 06 51 pm

I have also noticed that the callbacks are being called twice upon initializing, as demonstrated in this test: https://github.com/plotly/dash-core-components/blob/62e90491c67a79edcfb0bdbdf2f5fa134efd791e/test/test_integration.py#L898 which could also be caused by unexpected re-rendering behaviour.

valentijnnieman avatar Feb 07 '19 20:02 valentijnnieman

I had a problem of callbacks being called twice even after initializing. When I click a button, there is a first call to the callback, and after some seconds, a second call to the callback is triggered. However, n_clicks = 1

ZeCarlosCoutinho avatar Mar 01 '19 17:03 ZeCarlosCoutinho

Not sure if this is still an issue, but moving it to dash so we don't lose it.

alexcjohnson avatar May 22 '19 18:05 alexcjohnson

I'd be curious to know if this is satisfied by the adjustments in Dash 3.

BSd3v avatar Apr 10 '25 15:04 BSd3v