This site is built with Hugo static site generator. Being a static site, it doesn’t have a fancy back-end engine. No database either. Nothing breaks if left alone.
Still, Hugo team releases new versions from time to time. They add new features, fix some bugs and add new ones. I don’t upgrade to every new version. But occasionally I want to upgrade.
However, every time I do something breaks. Most often the thing that breaks is not on the front page, it somewhere else deep inside the site.
Time over time again I would upgrade the site and spin it up in a local environment. I would click around it, and everything would look ok. I’d push it to production. Then, days later, I would find a bug that affects quite a few pages. Because it is already in production, I would rush to fix it in the middle of the night till 3 am.
Having been through that a few time, I asked myself: can I do that better? Can I somehow test the entire site for regression and detect problems before I push the site into production?
Although there is no shortage of tutorials explaining callbacks, promises and async / await, most of them leave you scratching your head because they don’t answer one question:
What the heck asynchronous mean?
Most of the tutorials and articles I read just assume you already know that. What if you don’t? That’s why you are here.
Keep reading, and I will explain:
What synchronous and asynchronous mean
Why we need asynchronous operations
How asynchronous operations work
If you are learning React using a book or an online tutorial, you may be in for an unpleasant surprise. One minute you are following along, and then you get pissed off once you realise that the instructions you are following are hopelessly outdated. Even 5-star tutorials are best-selling books won’t protect you from that.