RM
Implement lazy loading for videos using Intersection Observer API. Improve site performance and user experience. Code snippets and example using Vanilla JS
Looking to migrate from query-string to URLSearchParams? Example and walk-through in this article.
Solution and explanation of the error "Cannot read properties of undefined (reading 'main')". Caused by Material UI incorrect Migration.
An example of how to permanently redirect a URL using Next.js. 301 is actually a 308, and how to wildcard path match within next.config.js
Looking to increase the speed of a React website? Want to split out components and only load them on click? Here is a solution for lazy loading React components on click.
Video iframes are heavy. The JavaScript in the player is not needed immediately. Lets defer everything but thumbnail until the user presses play. Solution in React for YouTube.
A basic overview of testing with Jest and React Testing Library. What are the differences between the two? How should they be used?
An example of how to use a WordPress favicon within Next JS. WP GraphQL registering code snippets, and step by step explaination.
A walkthrough and example of how to use Yoast sitemap XML files from a headless WordPress install in Next JS.
Sometimes when writing Jest unit tests you are going to want to be able to loop over items to quickly test different cases. Whether this be looping over an array of items, or counting between numbers in your Jest Test....