Using web workers for heavy computation
UserService class. It creates a unique ID for each user card and saves it into the
localStorage. However, it loops a couple of thousand times before doing so, which causes our application to hang for a while. In this recipe, we'll move the heavy computation from the components to a web worker and will also add a fallback in case web workers aren't available.
The project we are going to work with resides in
Chapter12/start_here/using-web-workers, inside the cloned repositor: