You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the way to visit a Flow is using the collect method.
I am worried about this name, because a non trained developer is tempted to looking for a xxxEach method (see here).
Unfortunately the only available method is onEach, worse this isn't a terminal method.
A solution is to find another name to visit a flow, otherwise I propose to add -for now- the following method:
@Deprecated("forEach is harmful, use collect instead", ReplaceWith("this.collect(action)"))
publicsuspendinlinefun <T> Flow<T>.forEach(noinline action:suspend (T) ->Unit) = collect(action)
The text was updated successfully, but these errors were encountered:
Currently the way to visit a
Flow
is using thecollect
method.I am worried about this name, because a non trained developer is tempted to looking for a
xxxEach
method (see here).Unfortunately the only available method is
onEach
, worse this isn't a terminal method.A solution is to find another name to visit a flow, otherwise I propose to add -for now- the following method:
The text was updated successfully, but these errors were encountered: