. What is the purpose? and does it ever make sense for custom composables to be defined as inline?
z
Zach Klippenstein (he/him) [MOD]
05/24/2021, 6:13 AM
From what I’ve heard, the main reason those are inline are because inline composables don’t have a recompose scope (they’re inline, so they just share their caller’s scope), which means they also avoid the extra bookkeeping that goes along with recompose scopes. And because these composables are fundamental building blocks, used absolutely everywhere, avoiding recompose scopes for them has a significant performance benefit.
Zach Klippenstein (he/him) [MOD]
05/24/2021, 6:14 AM
So it’s probably not going to matter too much for custom composables, unless you’ve done benchmarking and profiling and determined that that particular issue is causing performance to degrade.
👍 1
➕ 1
a
Adam Powell
05/24/2021, 6:18 AM
Exactly, Row and Column benefit because they're often subject to deeper nesting for layout control reasons, and people naturally factor out semantic composables consisting of them that host the appropriate recompose scopes