is it possible to identify if a composable fun is ...
# compose
m
is it possible to identify if a composable fun is running on preview or device ? some code need fake config for preview only
j
No - hoist that input of the composable instead 🙂
1
m
so, there is nothing like old ‘isInEditMode’ ?
it seems there is
we can bypass troublesome code for preview with:
Copy code
val inInspectionMode = LocalInspectionMode.current
if else
👍🏻 1
👍 2
n
this is the way mandalorian