For stuff I script after work. Some of it, at least.
Typescript - discriminated unions for more concise react component prop types
If your react component can accept a prop (or not) based on the value of another prop, typescript can help to avoid mistakes by giving proper warnings on incorrect usage.
2022-06-17Access Express and CRA (Create React app) development server routes on same localhost port
Need to serve some static html's using Express for landing routes + serve a React app, and access this on one single local port for development? Don't use CRA's "proxy", instead use your Express backend to proxy requests to CRA dev server when needed.
2022-01-30Make CRA dev server respond to CORS OPTIONS requests, as a gentleman should
Create React App allows you to configure a proxy server, modifying responses it makes. This can be useful for a lot of things, we'll use it to set up cross origin communication between two CRA apps running on same machine, different local domains.
2021-09-15Setting up a cronjob in a docker container running alpine linux node image container
It's simple stuff that took me way too long to figure out.
2021-08-18Track view duration of fake social network feed items using intersection observer. Part 1.
A part of a series where we create a photo feed, and track the view duration of each item, displaying results in a real time dashboard. Should look cool, and show me my favorite pics.
2021-08-11Learning to (kind of) enjoy test driven development in JS with simpler tests
TDD enforces good practices - including actually making your components easily testable without duplicating their functionality in test code and, having broken tests after minor(est) reworks.
2021-01-04Test driven development and reading on how to simplify my code
Force myself to follow TDD on personal experiments.
2021-01-01