Description
We pass a growing number of props that are just relevant for certain columns via MemoryWidget/MemoryTable. To avoid cluttering those components with props that are only really relevant to columns, it has been proposed:
to introduce a new lifecycle on the columns so that they can update any relevant state onComponentDidUpdate or whatever seems best
This would mean to add another method in the column interface that we can invoke onComponentDidUpdate in App to update each column, passing them a new object state. This would allow us to avoid having to pass column-specific state down to the MemoryWidget/MemoryTable and move the data lifecycle of columns closer to where they are instantiated, and closer to the component that actually owns this state.
Description We pass a growing number of props that are just relevant for certain columns via
MemoryWidget
/MemoryTable
. To avoid cluttering those components with props that are only really relevant to columns, it has been proposed:This would mean to add another method in the column interface that we can invoke
onComponentDidUpdate
inApp
to update each column, passing them a new object state. This would allow us to avoid having to pass column-specific state down to theMemoryWidget
/MemoryTable
and move the data lifecycle of columns closer to where they are instantiated, and closer to the component that actually owns this state.Additional information See https://github.com/eclipse-cdt-cloud/vscode-memory-inspector/pull/89#discussion_r1509394903 for the original discussion on this matter.