Henrik Sommerfeld

Tag: Javascript

Gatsby vs Hugo for a Personal Blog

Having built two personal websites/blogs that are fairly similar, one using Gatsby and one using Hugo, I’ll take a moment to compare my experiences. All CSS is written from scratch for both sites, no framework. They both have categories and tags that you can use to find related posts. No server-side API is used, so once the build is done, everything is static. Well, I use Google Analytics and Disqus on both sites, but those are third-party API's that I don't have to manage. Read →

Gatsby Source Plugin for Twitter

I was rewriting a WordPress site in Gatsby that had embedded tweets using an embed script (WordPress plugin). The product owner (my wife), required the new site to also show her tweets. I didn’t like the idea of an embed script (that would slow down the site and spy on visitors), so I started to look into Gatsby source plugins. Read →

Error Handling with Fetch (and custom React hook)

One thing that has struck me with Javascript's fetch function is that it often looks so simple. When I see the same thing in a pull request, I'm not overly impressed. No, just because this works on a sunny day doesn't mean you're done. You need error handling as well! Read →

Create Fake Backend with Node Express

The thing I’m most satisfied with in a long time is the introduction of a fake backend for my team’s frontend development. When you have another system that you depend on and that you have no control over, it’s always worth considering if that system can be replaced with a fake version for development. This is especially valuable when this backend system(s) is highly configurable and can be in a lot of different “states” that you cannot control. Read →

Replacing Web Compiler With Node Sass

After a long time of unreliable results with Web Compiler, especially in TFS, I decided to replace it with node-sass. Web Compiler is an extension to Visual Studio that listens to changes in your .scss files (among others) and compiles them. It can also be configured to run as part of your TFS build. With our solution this has however been highly unreliable, where Web Compiler claims that files have been compiled, but the changes you made are not reflected in the resulting bundles. Read →

No matching posts found. You can use wildcards and search only in titles, e.g. title:iot
Loading search index, please wait...
Search index failed to download 😢