3 ms·
I inherited a React codebase that was littered with setTimeout() for no apparent reason.
by caradine 4y ago
I inherited a React codebase that was littered with setTimeout() for no apparent reason.
- bmelton 4y agoBad race condition protection or trying to impose a sense of gravitas through loading times?
- robocat 4y agoI think setTimeout() is a bad code smell because it very often introduces race conditions. Fortunately async has reduced the need for it.
- jamil7 4y agoRecently worked on an iOS app with the exact same thing, delays inserted on every write which was basically instant as it was writing to SQLite. Client refused to remove it too, you need to pick your battles as a freelancer to get anything done, so I left them there.
- deleted 4y ago[deleted]
- kevincox 4y agoIf you are lucky it is to give the illusion of the app working hard. If you are unlucky they are "fixing" race conditions.