RM

  • Blog

Blog - Page 2

Tool we love - formbear.io

Ship Forms in 60 Seconds

Stop building form backends. Perfect for MVPs & validating ideas.

How To Permanently Redirect (301, 308) with Next JS

How To Permanently Redirect (301, 308) with Next JS

Last Updated: May 2, 2023

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

Lazy Load React Components on Click

Lazy Load a React Component on Click

Last Updated: December 8, 2022

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.

Lazy load YouTube video iframe until click in React

On-Click Lazy Load YouTube Video Iframe in React

Last Updated: November 28, 2022

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.

CSS position sticky not working

Solution to why CSS ‘position: sticky’ is not working

Last Updated: September 19, 2023

The CSS 'position: sticky' was not working when I added an overflow value to an ancestor element. This piece explains why, and provides the solution.

Mocking A React Component In Jest

Testing with Jest and React Testing Library

Last Updated: April 28, 2023

A basic overview of testing with Jest and React Testing Library. What are the differences between the two? How should they be used?

Next JS with WordPress to create a manifest - Pages Router

Create Manifest file in Next JS from Headless WordPress (Pages Router)

Last Updated: September 19, 2023

An example of how create a manifest file within Next JS Pages Router using headless WordPress. WP GraphQL registering code snippets, and step by step explanation.

Headless Wordpress, Favicons and Next JS

Add Favicons to Next JS from Headless WordPress

Last Updated: August 1, 2023

An example of how to use a WordPress favicon within Next JS. WP GraphQL registering code snippets, and step by step explaination.

Use Yoast Sitemap with Next JS and Headless WordPress

Use Yoast Sitemap with Next JS and Headless WordPress

Last Updated: May 2, 2023

A walkthrough and example of how to use Yoast sitemap XML files from a headless WordPress install in Next JS.

How to loop jest unit tests

How to Loop in Jest Unit Tests

Last Updated: November 28, 2022

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....

Lazy Load Vimeo Videos in React

Lazy Load Vimeo Video Iframe – Show on Scroll

Last Updated: August 2, 2023

Solution to Vimeo videos/iframes negatively effecting website load speed. Use Intersection Observer API To Lazy Load. React component included in article.

Mocking local storage in Jest tests

How to Mock Local Storage in Jest tests

Last Updated: November 21, 2022

A walkthrough on how to mock local storage in Jest tests, as well as how to clear storage in jest tests. Example included.

Adding Google AdSense to Gatsby website

Adding Google AdSense to Gatsby Website

Last Updated: July 27, 2023

Adding Google AdSense to a Gatsby Website. Lazy load the Google AdSense script to keep site speed fast. Examples and walk through in article.

  • Prev Page (1)
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Next Page (3)

Helpful Bits Straight Into Your Inbox

Subscribe to the newsletter for insights and helpful pieces on React, Next JS, Headless WordPress, and modern web development.

Powered ByFormBear
By Robert Marshall