4 ms·
>Most UIs are some form of lists that then produce multiple different values for each item in the list. This creates a natural hierarchy. I find this idea a li
by kace91 9y ago
>Most UIs are some form of lists that then produce multiple different values for each item in the list. This creates a natural hierarchy.
I find this idea a little controversial - it is certainly true for websites, but I don't think it's necessarily the case for single page applications that have a purpose beyond showing data.
I think in those cases the 'natural hierarchy' approach tends to break and the idea of passing arguments in a hierarchical manner can become cumbersome. At least that is my experience so far,
- swyx 9y agoProp drilling was a React pain point for sure but they have solved it with the concept of "context", which was formally released with 16.3. You can also regard this as "implicit props", or "implicitly passing arguments by nature of the hierarchy"