What are transducers and why they're cool?

A few weeks ago while I was browsing for reducer-functions, I stumbled upon a term called “transducer”. Because I really like simple and declarative data transformations in code (e.g. with map and reduce), I looked into this topic. At first transducers can be kinda hard to grasp, but once you got it, you’ll have an elegant technique for efficient and composable transformations in your “developer toolbelt”. What does it do? The name “transducer”, consisting of the words “reduce” and “transform”, describes its functionality pretty well....

February 22, 2018 · 8 min · Dustin Chabrowski

Share code with React Native

A few days ago, I needed to restructure a react web app in such a way, that we can build a react native app (with create-react-native-app) using as much of the existing code as possible. So the main goal was code reuse/code sharing, while not breaking react native’s reloading or introducing a complicated setup. Restructure the files Let’s start with the initial structure. The web app web contained all code, which was structured reducers, actions, api, components and so on:...

January 23, 2018 · 2 min · Dustin Chabrowski

Setting up hot module replacement with Create React App and Redux

If you’re using Create React App (CRA) to scaffold and develop your app you’re familiar with its reloading feature. Whenever you change a component file for example, the whole application gets reloaded automatically just as you would hit the refresh manually. This is a nice feature when you start developing, but as soon as your app gets more complex and has various states and routes for example, it becomes quite cumbersome to put the app in the state it was before the reload....

November 2, 2017 · 3 min · Dustin Chabrowski

Sending push notifications with payloads using web-push and VAPID

The last time I used the push notification service for this blog to send out a link to a new post, I noticed that in Chrome no notification was received. After some digging around it became obvious that they changed the API, so it was the right time to check and revise the current setup. So in this article I want to show how my current system works and the tools I used, which may be interesting for some of you....

October 21, 2017 · 6 min · Dustin Chabrowski

Using rollup.js with gulp.js

Some time ago I wrote about how to use and configure rollup.js in conjunction with Babel featuring gulp.js as the task runner. Since then, a lot has happened in web developer land and fortunately things got easier as well. Because I still like gulp.js and rollup.js and one does not need the full webpack power (and sometimes madness) everytime, I want to give a quick overview on how I use these tools today....

September 30, 2017 · 4 min · Dustin Chabrowski