Maybe have an fx that does delayed dispatching from your initial event to update the state later
Alternately, if you need the concept of a clock in your app, just have a current time value in your state that gets updated from a setInterval and then add a delete at
key to those things
But the first is conceptually simpler
You could also delve into one of the react animation libraries and just have a super sharp transition after a delay
Or if you’re on cutting edge react something with useState
Personally I’ve used the “delayed dispatch” pattern a lot and it’s pretty flexible
I use delayed dispatch as a side effect in other places in the app. I'd like to use that here as well. However, I do not find a clean place to do it here. The individual state updates are unaware of this need at the moment. They just update their things and then this view sort of have two ”versions” that depend on some specific subset and combination of those things. So I have a function like (defn have-all-things? [state] ...
and on the result of that I determine which version to display. Maybe I do need to add something that is aware of this subset/combination of things into the the state updates...