takes a dependency list, I assume it's somehow better for performance to use it rather than deriving the state? Is there a list of cases where it's recommended or not?
m
myanmarking
12/13/2022, 9:46 AM
i think that assumption might be false. derivedState should be more performant than remember keys. Simple because derivedState is like a ‘distinctUntilChanged’. Meaning, a combination of state leading to the same result won’t be recomposed. I dont think the same applies to keys,
c
CLOVIS
12/13/2022, 10:56 AM
Oh. I thought there would be some kind of cost associated with automatically detecting which state objects should be watched for changes. I guess the fact that this is not possible in other frameworks made me think it had to be expensive.
m
myanmarking
12/13/2022, 10:57 AM
that would be a really strong guess tho. Better advise yourself with some1 with compose team. But i’m pretty positive