I need to make a lazy which will be remembered acr...
# compose
s
I need to make a lazy which will be remembered across recompositions. How can I do this?
e
Copy code
val foo by remember { lazy { ... } }
?
x
The idea feels strange for me, I don’t feel like there’s any reasonable case for that. Take into consideration that
remember
can be though as an equivalent to
lazy
but in the context of Compose. Take a look at this Medium post
a
Remember is eagerly computed though so it isn’t lazy
x
Yes, I'm not saying they're the same in all terms. But from a functional programming perspective, both of them implement memoization