Lambdas are memoized only if everything in it is "stable" , yes? Well, some things like contexts and view models aren't always stable, so those ones don't get remember-ed. Are there any pitfalls to manually doing it?
remember { originalLambda }
ascii
08/30/2023, 12:00 PM
I ask only because there's always something in the parent that recomposes it, e.g. Scaffold with scrollBehaviour and innerPadding.
Child composables that have such lambdas are unnecessarily recomposing unless I remember them.
ascii
08/30/2023, 12:01 PM
(there's only one activity, so there should only be one context throughout, same for viewmodels)