Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor how props are passed to columns #95

Open
planger opened this issue Mar 6, 2024 · 0 comments
Open

Refactor how props are passed to columns #95

planger opened this issue Mar 6, 2024 · 0 comments

Comments

@planger
Copy link
Contributor

planger commented Mar 6, 2024

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 #89 (comment) for the original discussion on this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant