Props drilling
#24860
Replies: 1 comment
-
I think useSelector is growing in use, and this is just one of those "long tail" improvements that need to be made, but is always competing against features and bugs for prioritization. I believe we'd welcome PRs addressing this if you have interest in sprucing things up! @eschutho @kgabryje @justinpark and @michael-s-molina might be interested in this conversation as well :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question:
Hi, I was looking through various frontend components in the project and was surprised by the number of drilled props in some of them. I have a question why not depart from this practice and not design components as isolated entities, and get the necessary values directly from Redux storage using hooks such as
useSelector
?It seems to me that this had a positive effect on the readability of the code and the development of new child components did not cause a big headache.
Examples:
/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
/superset-frontend/src/dashboard/components/Header/index.jsx
/superset-frontend/src/pages/DashboardList/index.tsx
Beta Was this translation helpful? Give feedback.
All reactions