Home » JavaScript » React.js

React.js

ReactJS onChange Example

In this article let us explore event handling in ReactJS and specifically on the onChange event in Reactjs. We take a look at handling the change event of HTML tags. ReactJS has grown in popularity over the years and has become the go-to library for front end development. We will create a controlled component that displays an input tag. Subsequently ...

Read More »

ReactJS onClick Example

In this example, we will see an example of the ReactJS onClick event. We will discover ways to handle the click event of HTML elements using ReactJS. As you know ReactJS has soared in popularity. And has become one of the most favored libraries for front end development. We explore how to attach event handlers and handle the click event ...

Read More »

ReactJS with NodeJS Example

In this article, we go about creating or setting up a Full Stack JavaScript application. We use NodeJS for the server-side API and ReactJS for the Front-end of the application. To start off, we use express-generator to scaffold the server-side code and structure. And then proceed with the create-react-app package to generate the client-side of our application. So let’s get ...

Read More »

ReactJS and Redux Tutorial

In this post, we look at using the Redux library with ReactJS. Redux, in a gist, centralizes state management. It provides APIs and patterns to manipulate the state in a predictable way. This leads to consistent application behavior. Wherein for the same set of changes we get the same resultant state every time, the change is predictable. As we work ...

Read More »

ReactJS with Ajax Requests Example

In this post, we feature a comprehensive article about ReactJS with Ajax Requests. In this article, we will have a look at making Ajax requests in a ReactJS application. We will create a simple application where the user can type in a few characters and we will pass these on to the server in an Ajax request. The server, in ...

Read More »

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 »