faisalahmed
05/18/2023, 9:09 AMModifier.animateItemPlacement()
animations run.
I dont want to keep copies of my data, how can I delay this ?efemoney
05/18/2023, 9:55 AMfaisalahmed
05/18/2023, 9:56 AMStylianos Gakis
05/18/2023, 9:58 AMefemoney
05/18/2023, 9:58 AMqueryState
is for all intents and purposes, the “input” state. This is what you want to delay. Just like in the screenshot, you keep a copy of the state in another variable query
then use a launched effect or some other coroutine machinery to run you delay logic
In my case (ie this example) I wanted to add debounce logic to the incoming search query. Its implemented in a LaunchedEffect that monitors the input queryState
, debounces it and then updates the query
, which the rest of the logic then depends on.faisalahmed
05/18/2023, 10:19 AM