Recreating Signals for React using Proxy

So Javascript has this interesting feature called Proxy. This will allow you to intercept value getting and setting in a given object. This can be used to achieve Signals in React. By notifying listeners whenever the value property is set. For there to be listeners, we should also add a subscribe function that returns a […]

Koding.no

This article is about a Norwegian educational initiative that I helped start up, Koding.no. For this reason, the article is in Norwegian. Kode24 skrev i dag om Koding.no, et nytt initiativ som jeg nylig har startet i gang. Koding.no sikter mot å bli en solid ressurs for nybegynnere som har lyst til å lære seg […]

Ryfylke React Toast

@ryfylke-react/toast is a lightweight headless toast library. The problem Most toast-libraries I’ve come over are generally very clunky and opinionated. Yes, you can customize the toasts through options and props, but it’s generally tedious, and you have to overwrite their existing styles. I’ve found that whenever I’ve needed to build a toast-system, I’ve ended up […]

Some interesting Typescript features I’ve learnt while writing NPM packages

Typescript is great, for many reasons. I think everyone will agree with that statement if they’ve given it a proper try. While writing type-safe NPM-packages, I’ve learnt a few tips and tricks that can help you utilize it for it’s full worth. Generics are magic Generics let you essentially tell Typescript that “I’m not sure […]

Loading state with Redux toolkit

Before createAPI came out, my current team needed a way of cleaning up all of the loading logic around our async thunks. We were using @reduxjs/toolkit, with createSlice and createAsyncThunk. A simple solution to our problem was essentially adding a match on the extraReducer builder for any thunk that included “:load” in its name, and […]

My 2021

Hi! It’s been a while. I wanted to write an article to explain what I’ve been up to lately, and share some hopefully interesting thoughts. Yearly write up Hopefully, I’ll be able to write more than one article next year. It’s been busy for sure, and just really a big change of scene. When covid […]