2019-03-26
1713
#jest#react
Benjamin Johnson
363
Mar 26, 2019 ⋅ 6 min read

Refactoring legacy code with Jest snapshots

Benjamin Johnson Software engineer. Learning every day, one mistake at a time. You can find me online at benjaminjohnson.me.

Recent posts:

the replay april 1

The Replay (4/1/26): Images are slowing your React app, cutting token spend, and more

Discover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the April 1st issue.

Matt MacCormack
Apr 1, 2026 ⋅ 32 sec read
shruti kapoor react image optimization

How to optimize images in React for better web performance

This post walks through a complete six-step image optimization strategy for React apps, demonstrating how the right combination of compression, CDN delivery, modern formats, and caching can slash LCP from 8.8 seconds to just 1.22 seconds.

Shruti Kapoor
Apr 1, 2026 ⋅ 7 min read

vinext explained: Cloudflare’s Vite-based Next.js replacement

Learn what vinext is, how Cloudflare rebuilt Next.js on Vite, and whether this experimental framework is worth watching.

Elijah Asaolu
Mar 31, 2026 ⋅ 5 min read

How to fix memory leaks in React applications

Memory leaks in React don’t crash your app instantly, they quietly slow it down. Learn how to spot them, what causes them, and how to fix them before they impact performance.

David Omotayo
Mar 30, 2026 ⋅ 9 min read
View all posts

Would you be interested in joining LogRocket's developer community?

Join LogRocket’s Content Advisory Board. You’ll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.

Sign up now