Posts tagged as quick tip
Concatenate multiple optional items with separators
📆2020-09-22🍱code
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…
Access private submodules in GitHub Actions
📆2020-07-09🍱tools
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…
Manage plugins natively in vim
📆2020-03-04🍱tools
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…
Update state with useReducer synchronously
📆2020-01-24🍱code
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…
Partial types in TypeScript
📆2019-11-21🍱code
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…
Conditions in CSS with the :not pseudo class
📆2019-08-05🍱code
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…