I am not sure turning inherently synchronous code into async is a good idea. Promises are OK (not great - observables are better in many cases) for async operations but I would definitely avoid introducing the complexity for inherently sync operations.
By using this pattern, you are forcing all your code to be async.
We're a place where coders share, stay up-to-date and grow their careers.
I am not sure turning inherently synchronous code into async is a good idea. Promises are OK (not great - observables are better in many cases) for async operations but I would definitely avoid introducing the complexity for inherently sync operations.
By using this pattern, you are forcing all your code to be async.