What is the reason for `remember()` not using all...
# compose
n
What is the reason for
remember()
not using all the variables referenced by
calculation
as implicit keys by default? Wouldn't it result in more correct usage? Thanks.
z
They don’t always need to be keys
👍🏻 1
And even if they did, it’s not possible to introspect the lambda to find all variables referenced without more custom compiler magic. You could use the result of the lambda, but then that’s equivalent to not using
remember
at all.
🙏 1
n
custom compiler magic
Yes, I would have expected more compiler magic 🙂 Something similar to what the compiler plugin does with
derivedStateOf()
.
z
The compiler plugin doesn’t do anything with
derivedStateOf
😮 1
today i learned 1
Compose’s compiler plugin is ONLY used for making the
@Composable
annotation work
👍🏻 1
🙏 1