Hey guys, I get this warning/error when I try to m...
# coroutines
r
Hey guys, I get this warning/error when I try to map a flow to a different value
Copy code
Flow operator functions should not be invoked within composition
e.g.
Copy code
MyComposable(
flow = viewModel.flow.map { it + it }
)
the error shows on
map
what the better approach here?
is doing
Copy code
val x = remember { viewModel.flow.map { it + it } }
the right way?
z
remember(viewModel) { … }
, but yea
👀 1
1
🙏 1