Preventing multiple observables from firing from Redux-Observable

Image by Brett Hondow from Pixabay I’ve recently finished a basic course on RxJS. The main reason was to use Redux-Observable after watching this video, “Netflix JavaScript Talks – RxJS…

October 19, 2019

Installing Dokku on Kubuntu

Image by StockSnap from Pixabay As I was looking for ways to deploy a node & react site for intranet, I was looking for a self-hosted PaaS (Platform as a…

September 29, 2019

React Sticky Event with Intersection Observer

Photo by Kelly Sikkema on Unsplash There isn’t a way to monitor stickiness of a component in CSS (position: sticky). This nice article on Google, An event for CSS position:sticky shows how to…

August 24, 2019

React.Suspense doesn’t work with Gatsby (yet)

Photo by Егор Камелев on Unsplash(Chosen as a featured image because it’s a suspense-invoking cute lil’ creature 😅) I was loading components dynamically on Gatsby using React.lazy, which required to use React.Suspense. But…

August 01, 2019

Adding a Twitter Reply via Twitter API

A quick note to self regarding adding a reply on Twitter using Twitter NPM library. POST statuses/update POST statuses/update lets one “tweet” a status on Twitter. But when you want…

July 28, 2019

Page Not Found on Netlify with MDX-Deck

Photo by Sora Sagano on Unsplash You might run into the following error after deploying an MDX-Deck presentation decks to Netlify. Please refer to my friend, Dave Follett‘s post on how to deploy…

July 26, 2019

“href” vs. “src” in HTML

Last night, I vented out my frustration on <link> requiring href to point to a CSS stylesheet instead of src. I will share the help I received and the history…

July 18, 2019

How to use TSDX

A Zero-configuration CLI (command line interface) for creating a TypeScript library Photo by solmaz hatamian on Unsplash After migrating react-use-localstorage to TSDX, I wanted to share what TSDX is and how to use…

June 17, 2019

Promise.race vs. Promise.any And Promise.all vs. Promise.allSettled

Photo by Ryan Franco on Unsplash What’s new in JavaScript (Google I/O ’19) on May 8, 2019 showed what’s coming/available for static Promise combinator methods, Promise.allSettled and Promise.any. There are already two methods…

May 18, 2019

Scrolling with Page Up/Down Keys in React-Window

Photo by Ruthie on Unsplash React-Window is a React library by Brian Vaughn for rendering a massive amount of items in a list (or a grid but I will use “list” to…

May 08, 2019

Two gotchas in Chrome Developer Tool Console

Photo by Jason Leung on Unsplash There are two surprising behaviors on Chrome Developer Tool Console (“console” hereafter). First one was pointed out by my friend Nicolas Marcora that you can await…

April 20, 2019

Adding numbers using Boolean operations in JavaScript

Photo by Crissy Jarvis on Unsplash You know how to add numbers progmatically, right? 1 + 1 will basically give you 2. Numbers are added in binary form down in machine level.…

April 14, 2019

Spread syntax gotcha in JavaScript class methods

Photo by Jay on Unsplash – Don’t get caught Watch out when exposing a mutable data structure with React Hooks When you spread an object instance of a class to expose methods,…

March 30, 2019

@cshooks/usetrie, A React Hook for Typeahead/Autocomplete

Photo by Jamie Street on Unsplash – “trie” is from “Retrieval” thus the cute 🐶 “Retriever” I’ve released @cshooks/usetrie. It’s a React Hook for Typeahead/autocompletion. @cshooks/hooks will be the home 🏠 of Computer…

March 23, 2019

Emoji Error in Chrome Extension HTML

Photo by Bernard Hermant on Unsplash I’ve had a problem where I was trying to display an Emoji in a Chrome Extension header of default popup HTML, page_action.html (specified by page_action -> default_popup…

February 17, 2019

Being explicit with your own React Hook + TypeScript return type

Photo by Rafaela Biazi on Unsplash TheAifam5 graciously reported an issue for react-use-localstorage that even though it was written using TypeScript, it wasn’t distributing TypeScript type declaration file. react-use-localstorage is a React Hook…

February 10, 2019

Getting DOM content from Chrome Extension

Photo by Sai Kiran Anagani on Unsplash Note to self on how to get DOM content from Chrome Extension As I was building a Chrome Extension, Easy GitHub to generate I had to…

February 10, 2019

Dynamically build TypeScript string literal type

Photo by Kevin Jarrett on Unsplash TypeScript has String Literal Types, which lets you specify what string value is allowed for a variable.You can specify the allowed literal values during type declaration. When…

February 02, 2019

Default Class Access Modifier Differences between TypeScript & C#

Photo by Patrick Fore on Unsplash Note to self… TypeScript’s class access modifiers are public by default while it’s private in C#. Quite a surprise as TypeScript was created by Anders Hejlsberg, who…

January 25, 2019

React + TypeScript with Parcel

Photo by Kira auf der Heide on Unsplash Learned today that it’s easy to create React + TypeScript site with Parcel without using CRA (create-react-app). Parcel Documentation has a whole (short but complete)…

January 23, 2019

Living on the edge with “dangerous”

As I’ve been using Styled Components (SC hereafter) and been wondering about the magic behind it. Thankfully, Max Stoiber (a creator of SC) has written an article, The magic behind…

January 13, 2019