Posts tagged as quick tip

Post thumbnail
Concatenate multiple optional items with separators
Concatenating strings is a pretty straight forward task in JavaScript and with the introduction of template literals with string interpolation things got even simpler. Let's say that we want to concat a couple of inputs of a form that is…
Post thumbnail
Access private submodules in GitHub Actions
Using submodules can be a simple solution to make some parts of a public repo private. For example I have separated the actual content of this blog to a private repo. Not because it's something secret (you are reading it now anyway) but it…
Post thumbnail
Manage plugins natively in vim
There are many useful plugins for vim and I've always used a plugin manager to handle them all. Recently I found out that vim has had support for package management out of the box a long time now. It was actually really simple to switch…
Post thumbnail
Update state with useReducer synchronously
Hooks in Reacts are wonderful to work with and managing local state is one of the most common ones. For more complex states the useState() hook could be changed to a useReducer() instead. A problem we might encounter is that state isn't…
Post thumbnail
Partial types in TypeScript
TypeScript is great for many reasons and when getting past the first few steps it really makes developing a joy. With that said there may come a time when objects keep growing in size and maybe not all properties will exist all the time…
Post thumbnail
Conditions in CSS with the :not pseudo class
When writing CSS we sometimes want some more logic to our styling. For example a navigation with multiple elements in a horizontal layout probably needs some space between the elements. A padding-right could do it but we don't want…

All tags