RM

  • Blog

Category: ReactJS - Page 2

Tool we love - formbear.io

Ship Forms in 60 Seconds

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

NextJS and WordPress Shortcodes

Using WordPress Shortcodes with Next JS

Last Updated: July 27, 2023

Solution to using WordPress shortcodes in NextJS. Replace WordPress shortcode with React Component in NextJS simply.

Mocking A React Component In Jest

How To Mock A React Component In Jest

Last Updated: December 1, 2022

How to mock a React component in a jest unit test. Example of how to mock a default or named component using React Testing Library.

Use Within to Test in React Testing Library

How to Query and Test Within a Specific Component in Jest

Last Updated: November 21, 2022

Examples of how to use within in Jest and React Testing Library to target a specific section of the component. Restrict Jest queries to a particular element. Inside the context of a DOM node.

MUI DatePicker Localization date-fns locale

Dynamically import date-fns locale files for MUI DatePicker localization

Last Updated: July 27, 2023

Using React MUI DatePicker dynamically lazy load date-fns locale files for localization. Reduce page size, speed up load time. Full working example and how to solution. Import locale files from date-fns.

Shortcodes from WordPress in Gatsby

Using WordPress Shortcode Functionality in Gatsby

Last Updated: July 27, 2023

Solution to using WordPress shortcodes in Gatsby. Replace WordPress shortcode with React Component in Gatsby simply. No MDX needed.

Unit testing localizations for React app

Unit Testing Localizations in React App. Solution for Mocking Intl API

Last Updated: September 29, 2022

Solution for error 'RangeError: timeZone is not supported.' when unit testing Intl API. Caused by Node not supporting time zones

Brand logos for WordPress Gravity Forms and Gatsby

Headless WordPress Gravity Forms with Gatsby – Step by Step Tutorial

Last Updated: August 1, 2023

Tutorial for headless WordPress Gravity Forms with Gatsby Frontend. Step by step guide to rendering forms as React Components and handling submissions.

aMaterial UI React Updated Causes Error disableBackDropClick

“disableBackdropClick of ForwardRef(Dialog) is deprecated” – Solution and Example

Last Updated: September 29, 2022

Updating React Material UI Core causes error: 'Failed prop type: The prop `disableBackdropClick` of `ForwardRef(Dialog)` is deprecated' - SOLVED! With example.

media.net scripts added to React website

How to Add media.net Advert Scripts to a React Website

Last Updated: September 29, 2022

Solution for adding media.net ad script to React website. Provides a React component for showing media.net adverts. Simple example of how to add script to a website.

Lazy Load YouTube Videos in React

Lazy Load YouTube Video Iframe – Show on Scroll

Last Updated: December 1, 2022

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

Small dog doing React component unit testing

Check React Component Props are Passed to Child in Jest Unit Test

Last Updated: November 21, 2022

How to unit test a React parent component logic, and check that a child component is passed the correct props. Test if a component is called with expected argument using React Testing Library.

Measure an Asynchronous Function and Delay by X Seconds with SetTimeout in JavaScript

Measure Asynchronous Function and Delay by X Seconds with SetTimeout in JavaScript

Last Updated: September 29, 2022

Helper function to measure the execution time of code in JS and add X seconds to delay. Time asynchronous function and sleep code for specific time, including await time.

  • 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