eclipse-cdt-cloud / vscode-memory-inspector

vscode memory inspector
https://open-vsx.org/extension/eclipse-cdt/memory-inspector
Eclipse Public License 2.0
6 stars 10 forks source link

Refactor how props are passed to columns #95

Open planger opened 6 months ago

planger commented 6 months ago

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.

Additional information See https://github.com/eclipse-cdt-cloud/vscode-memory-inspector/pull/89#discussion_r1509394903 for the original discussion on this matter.