Today I learned

Array Sort modifies the original array

#JavaScript

JavaScript provides us a ton of useful array methods. One of them is the .sort() method, which as the name says sorts an array. This is…

Read more

HTML Sanitizer API

#HTML#Web Security

Today I learned that there is a HTML Sanitizer API ↗ . It takes untrusted strings of HTML and sanitizes them to enable a safe insertion…

Read more

Efficiently load third-party JavaScript

#JavaScript#Performance

Third-Party JavaScript is one of the number one things that slows down modern websites. And it's often hard to improve as you are unable to…

Read more

Data fetching in React 18

#React#API

If you've worked with React you've possibly done something like this to fetch data from an API: With the release of React 18 a lot of people…

Read more

How to write great alt text

#Accessibility#HTML

Writing good alt text is hard. I get it. But not having any alt text is the worst you can do. It's still one of the most common…

Read more

Automatic ER diagrams

#Backend#Prisma

Someone on Twitter shared this automatic ER diagram generator for prisma. At my last job we manually updated our ER diagram on every…

Read more

Missusing useEffect

#React

Today I learned that Reacts useEffect is not meant for data fetching and is not a state setter either! This questions all my best…

Read more

Most common accessibility issues

#Accessibility#HTML

The web is not accessible . That’s not new, that’s not what I learned today. But the amount of accessibility errors did surprise me. The…

Read more

Confetti

#HTML#React

In a project I worked on recently someone mentioned it would be cool to have some confetti after a form submission . I loved this idea…

Read more

POST vs. PUT

#API

As I was recently part of a team developing a RESTful API, I stumbled a lot about the differentiation between POST and PUT requests. I…

Read more

Headless Wordpress

#API#GatsbyJS

Today I learned about headless wordpress. Wordpress now offers a REST API which makes it possible to decouple the frontend completely from…

Read more

Encoding POST request body

#API

Today I learned, that passing unencoded text into the body of a POST request is a bad idea. It could result in security issues and…

Read more

CSS container queries

#CSS

I can't believe I'm actually writing this but CSS container queries are coming! 🥳 🎉 At some point I stopped counting the times when I was…

Read more

Improving SEO with Gatsby Gitinfo

#Git#GatsbyJS

When you are using GatsbyJS there is a really useful plugin to add git infomation to your pages. The gatsby-transformer-gitinfo plugin…

Read more

The Set Object

#JavaScript

Today I learned about the Set object. It lets you store unique values of any type, whether primitive values or oject references. It's…

Read more

React Suspense Lazy Loading Components

#React#JavaScript#Performance

While Suspense for Data fetching is still an experimental feature in React and is not yet available in a stable release, React 16.6 also…

Read more

Fetch API response.ok

#JavaScript

Today I learned that the fetch API does only reject on a Network error or when CORS is misconfigured on the server-side. This means requests…

Read more

Decode JSON web tokes

Today I learned that there exists this super cool tool which can help you to decode JSON web tokens. Check it out here: https://jwt.io/ You…

Read more

JavaScript Array Mutation

#JavaScript

Today I learned forgot, that the JavaScript array method mutates the original array. This caused me a lot of trouble and some nasty bugs…

Read more

No floating promises

#JavaScript

If you have worked with Promises in JavaScript, you know that Promises returned by functions must be handled appropriatly. Unhandled…

Read more