eclipse-cdt-cloud / eclipse-cdt-cloud/vscode-memory-inspector

Refactor how props are passed to columns

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
17
Forks
25
Avg merge
3d 22h
Merged PRs (30d)
8

Description

**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](https://github.com/eclipse-cdt-cloud/vscode-memory-inspector/pull/89#discussion_r1509394903):

> 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.