blog
.smessina
.com
Creating custom React hooks took me a while to “grok.” However, at their core, hooks are just components that don’t render. Here, I’ll show you the quickest, easiest way to extract a custom hook from a complex component.
.then
or .catch
?
December 13, 2021
In a recent Lunch and Learn with the Maxwell engineering team, we noticed two different ways to handle a rejected Promise. One can either include a second argument to the Promise’s .then() function, or add a .catch() function. Curious to learn more, I decided to dig in further.
It's harder than you think
October 22, 2021
Checking whether third-party cookies are enabled has always been a game of whack-a-mole. The techniques available to us are mostly unreliable. But it is possible to check third-party cookie status with JavaScript in a reliable way across all major browsers, and here’s how.
Because why not?
May 11, 2019
What happens when you try to shoehorn Google's Tag Manager into use as a CMS? Let's find out.
Dec. 16, 2018
On a winter Saturday morning, I discovered JavaScript’s React framework. I started with a simple tutorial. Before I knew it, 8 hours had gone by, I had created my first React app, and my girlfriend was calling me to tell me I was late for our dinner date.
From Frameworks To Benchmarks
Dec. 16, 2018
Ever wish you could compose JavaScript strings without the silly
"string" + "string"
notation?
Want to speed up your DOM updates? Are you sick of the Virtual DOM
Loading for every request?
From Frameworks To Benchmarks
Dec. 16, 2018
In my
previous post, I talked about how
to use JavaScript template literals to quickly and cleanly compose
dynamic JavaScript string and DOM nodes, but how do we inject
those into the DOM without innerHTML
calls hijacking
the performance gains we got from using template literals?