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 […]
Category Archives: Library
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 […]
RTK Query Loader 1.0.0
I’ve been continuing to work on RTK Query Loader, on the side, since it’s inception 4 months ago. In that time, I’ve fixed some bugs, added some new features and written a proper documentation site. Interface updates One thing that I’ve thought about for a while, was rewriting the input/output format for the loaders. It’s […]
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 […]
Reusable pagination library for React
I’ve made a real simple “hook + display component” library that you can easily implement whenever you want pagination. It’s easily configurable, customisable and also very lightweight at only 20.8kb. To install the library, run npm i @impedans/usepagination For documentation, see @impedans/usepagination on NPM
HUComponents – my new collection of components
Moving on from “SUBComponents”, I decided to make a new component library that was lighter, more reusable and well more useful in general. All of the components are published separately on NPM, so if you find one neat little useful component – you can install just that. The components usually have no dependencies, but a […]