Re:UI Web Design 5 Rules of Thumb
by caradine on Friday December 23, 2022 @10:33AM
(#34106875)
I inherited a React codebase that was littered with setTimeout() for no apparent reason.
[ Parent
| on HN ]
Bad race condition protection or trying to impose a sense of gravitas through loading times?
I think setTimeout() is a bad code smell because it very often introduces race conditions. Fortunately async has reduced the need for it.
Recently 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.