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

Try not to pass styling props down from Table to Table* components #1529

Open
acelaya opened this issue Apr 22, 2024 · 1 comment
Open

Try not to pass styling props down from Table to Table* components #1529

acelaya opened this issue Apr 22, 2024 · 1 comment

Comments

@acelaya
Copy link
Contributor

acelaya commented Apr 22, 2024

We are currently passing some props down from Table to TableRow, or from both of them to TableCell, via context.

Those props are then used to dynamically set CSS classes in the children components. This means, every time those change, all components down the Table tree will need to re-render.

However, we could achieve something similar via CSS directly, reducing re-renders when not strictly needed.

This was first discussed in #1525 (comment)

@robertknight
Copy link
Member

We should be aware of the hazard of doing something in JS which can be done in pure CSS, but I think we can defer this until we find it actually causes us a problem - either for code maintenance or performance reasons.

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

2 participants