Did you find that example kind of convoluted? No worries, let’s break it down real quick, and then I’ll share why I filter Boolean values.
You may be curious as to why a physical therapist, massage therapist, and strength coach is also an SEO & web performance expert.
Having spent the last decade in sports medicine, including several years as a full-time physical therapist (and Airbnb SuperHost who got over 500 reviews in 3 years), it was time for a change — so I started blogging on Medium to refresh my web development skills.
I was cussing on the toilet, again, because I’d accidentally clicked a link on my phone while reading The Ringer’s NBA coverage.
My mom would be embarrassed, I’m sure.
You see, I prefer to open links from their website in a new tab, because I don’t want to hit the Back button. Why would such a minor thing cause me to start cussing in such a compromising position?
It’s because their website is slow. If I hit the Back button, I have to wait for their site to load again, and it almost always loses my place as dozens of…
Making a shallow copy of an array or object means creating new references to the primitive values inside the object, copying them.
That means that changes to the original array will not affect the copied array, which is what would happen if only the reference to the array had been copied (such as would occur with the assignment operator
A shallow copy refers to the fact that only one level is copied, and that will work fine for an array or object containing only primitive values.
For objects and arrays containing other objects or arrays, copying these objects requires…
Why did they switch? What would they do differently today?
In July 2015, a massive heatwave struck London, with the unusual consequence of The Guardian switching from MongoDB to PostgreSQL just three years later.
At the time, The Guardian’s data was in a standard NoSQL database; MongoDB stored locally at Guardian Cloud, the data center in the basement of The Guardian’s office near Kings Cross.
While writers for The Guardian were live-blogging about the heat, developers at The Guardian…
Can you spot the bug in this React .jsx code using Tailwind CSS? 🐞
I can’t stop laughing, because today I saw the funniest ESLint error message I’ve ever seen in my life. Take a look:
There’s a lot to talk about, but we could easily spend 2 hours discussing all of the big new features, so let’s not do that. 😀
Here are the 3 things I’m most excited about in React 18, the next major version of React announced in June 2021. 🥳
I like to nerd out about web performance and core web vitals because I…
Next.js 11 arrived yesterday in the form of a major semantic version update dropped on a Tuesday morning, like you didn’t have anything else to work on this week at work.
The product announcement was delivered at Next.js Conf, which was less of a conference and more of a 24-minute YouTube video.
Unlike Jamstack Conf, which was a virtual conference hosted on the HopIn platform that included tons of fun networking and vendor booths, Next.js Conf was more like attending the screening of a short film followed by a hang session on Discord.
Oh, and Vercel dropped exclusive merch benefiting…
Array.prototype.filter()is infinitely more powerful than
Array.prototype.includes(), while the
.includes()method is easier to read and offers much better performance.
includes()method determines whether an array includes a certain value among its entries, returning
— MDN Docs
If you need to return the first matching item, you’d use
Array.prototype.find() instead of
The more powerful
.filter() method lets you test the entire array with an arbitrary criteria, and it returns a new array of all…
Frontend Software Engineer ♦ Developer Advocate ♦ SEO & Web Performance Expert ♦ Content Writer ♦ My Favorite Tech Stack: React / Next.js at Vercel