is it safe to use _`ContextAmbient.current`_ where...
# compose
b
is it safe to use
ContextAmbient.current
wherever I want in my code?
a
Safe in what way?
b
I was concerned that it could leak context or throw some kind of exception since it was static
t
As far as i understood the system now: This function is a composable and can only be called inside of an other composable function. So you can not use it everywhere. And inside a composable function it should be safe.
👍 1
a
As long as you don't send a long-lived reference someplace else 🙂