There is a high possibility that a lot of components in your React application will have to make calls to an API to retrieve data that will be displayed to your users. It’s already possible to do that using the componentDidMount() lifecycle method, but with the introduction of Hooks, you can build a custom hook which will fetch and cache the data for you. That’s what Ademola Adegbuyi will cover with this tutorial.
Read more…
Gatsby is a modern static-site generator that has revamped the way static websites are being built. It incorporates React, Node.js, and GraphQL to create stunning and blazing-fast websites. In this post, Aleem Isiaka will introduce Gatsby plugins, discuss the types of Gatsby plugins that exist, differentiate between the forms of Gatsby plugins, and, finally, create a comment plugin that can be used on any Gatsby website, one of which you will install by the end of the tutorial.
Read more…
Testing gives confidence in written code. In the context of this article, ‘testing’ means ‘automated testing’. Without automated testing, it is significantly harder to ensure the quality of a web application of significant complexity. Fails caused by automated testing may lead to more bugs in production. In this article, Chidi Orji is going to show you how React developers can quickly start testing their app with the React Testing Library (RTL).
Read more…
In this tutorial, Chidi Orji will show you how to work with Firebase push notifications in the backend and frontend. We’ll set up the notifications system with an Express back-end server. Afterwards, you’ll listen for the notifications in a React front-end app. You will implement the backend first, then move on to the frontend. In that way, you can use whichever section appeals more to you. So let’s get started.
Read more…
Building a well-functioning application requires good testing; otherwise, knowing whether your application works as expected would be a matter of guesswork and luck. Jest is one of the best tools available for testing React applications. In this article, Adeneye David Abiodun will show you everything you need to create a solid test for your React components and application.
Read more…
In this article, we’ll be looking at a new way of retrieving data in React Apps named SWR. This is a set of hooks for remote data fetching that makes things easier, such as caching, pagination, and so on.
Read more…
In this article, we’re going to learn how to use Immer to write reducers. When working with React, we maintain a lot of state. To make updates to our state, we need to write a lot of reducers. Manually writing reducers results in bloated code where we have to touch almost every part of our state. This is tedious and error-prone. In this article, Chidi Orjil going to see how Immer brings more simplicity to the process of writing state reducers.
Read more…
In this episode of the Smashing Podcast, we’re talking about learning React. What’s React like to work with, and how can experienced developers get started? Drew McLellan chats to Mina Markham to find out.
Read more…
In this article, Adeneye David Abiodun explains how to build a facial recognition web app with React by using the Face Recognition API, as well as the Face Detection model and Predict API. The app built in this article is similar to the face detection box on a pop-up camera in a mobile phone — it’s able to detect a human face in any image fetched from the Internet. Please note that you will need to know the fundamentals of React.
Read more…
In this tutorial, Shedrack Akintayo is going to learn about higher-order components, the syntax of higher-order components, as well as use cases for them. In the process, you will build a higher-order component from an existing React component. By the end of this tutorial, you will understand the basics of higher-order components and how to build them.
Read more…