Henrik Sommerfeld

Category: Coding

Netlify CMS - Incorrectly eaten value

I’m writing this in case I forget it later. Context I’m migrating my wife’s blog from WordPress to GatsbyJS and since she’s not comfortable with Markdown or Git, I need a CMS. I aim at a zero-cost solution and I want the content to be part of the repository, rather than a separate thing (like what an API driven CMS provides). Problem Netlify CMS crashes when the frontmatter is followed by a newline and an image. Read →

Refactoring z-index

Ever found a z-index of 999 in CSS and wondered if there really are 998 other elements below it? This is a post about how I have refactored CSS z-indexes to become sane. 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 →

Using Angular HTTP Interceptor for Logging

A thing we’ve found handy in the Angular application I’m currently working on, is the console logging of HTTP requests and responses. This makes it quick to determine if a problem exists in the Angular app or in the REST service we’re calling (that we develop alongside the Angular app). Since logging it this way will show exactly which method is being called, the data being sent, headers and everything you need, there is no risk of mistaking one server interaction with another one. Read →

Newer 1 ... 5 ... 10 Older
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 😢