Home » JavaScript » React.js

React.js

ReactJS setState Example

ReactJS has grown in popularity and is one of the most used frameworks. In this article, we look at the setState method of ReactJS. With earlier versions of React state feature was limited to components implemented using ES6 classes. But now with the introduction of hooks even function components can have state. We look at both the cases and how ...

Read More »

ReactJS Unit Testing Example

In this article, we take a look at unit testing ReactJS code. Writing Unit tests for code is the norm these days making testing of code less of an after thought. We take a look at some Unit Testing frameworks for ReactJS and how to configure them. There is a healthy ecosystem of Testing tools & Frameworks around ReactJS and ...

Read More »

ReactJS Table Example

In this article we will build a ReactJS Table Example. ReactJS has shot to fame and has become the front end library of choice. We look at how we can build a table with a set of components and keep it as flexible and configurable as possible. We will add features like styling and sorting to our table component and ...

Read More »

ReactJS Lifecycle Methods Tutorial

In this piece, we are going to dive into the ReactJS lifecycle methods. We explore the events as a component renders to the DOM. Updates to a component trigger additional lifecycle events that we will also look at. We build a simple ticker component and log out method names as they run. To start off I will be using create-react-app ...

Read More »

ReactJS Infinite Scroll Example

In this article, we implement the Infinite scroll feature in a ReactJS application. This feature allows us to load and present additional content as the user scrolls the container. It creates an impression of seemingly infinite content and thus the name infinite scroll. In this article, we will create a container that, when scrolled would load additional content into the ...

Read More »

ReactJS Hide Component Example

ReactJS is one of the most popular JavaScript libraries today. In this article, we take a look at how to hide a ReactJS component. There are a couple of ways to achieve this. We will look at each method and walk through its implementation in this article. For the example that we will build, I have used the following stack ...

Read More »

ReactJS Event Listener Example

In this article, we take a look at event handling with ReactJS. ReactJS is a very popular front-end library used to build Front ends of high-performance applications. Handling events in ReactJS is very similar to handling DOM events using plain JavaScript. But there are some differences as we will see in this article. 1. Introduction Let us get started by ...

Read More »

React UI Components Example

In this article we take a look at some of the best free React UI Components. These are picked based on my experience over the years using widget libraries with various front end frameworks. The widgets or UI Components that we will take a look are available for free to use them in your projects. So lets saddle up and ...

Read More »

ReactJS Webpack Tutorial

In this article we will look at Reactjs Webpack configuration for a Reactjs Application. Webpack is a hugely popular bundler. We will take a look at how we can configure it and set it up from scratch for an Application built with Reactjs. Specifically we will look at configuration of babel to transpile JSX code apart from other regular items ...

Read More »