DEV Community

Discussion on: How do you handle the disposable IF statements ?

 
qm3ster profile image
Mihail Malo

Yeah.

For example the way you schedule network actions with an
offline-first/optimistic update system like Apollo, the Firebase client, etc.

Chaining on an actual promise of a network request or filling a stack of "tasks" which will begin sending to the network after a "cameOnline" poll or callback fundamentally represents the same idea: Preparing now actions that may run in the future if conditions are right.

Thread Thread
 
mazentouati profile image
Mazen Touati

I see, thanks for sharing your thoughts Mihail 😊