Front End Technology Articles

Page 593 of 652

How to add a new row in a table using jQuery?

Alshifa Hasnain
Alshifa Hasnain
Updated on 12-Feb-2025 2K+ Views

In this article, we will learn to add a new row to a table using jQuery. jQuery, a fast and lightweight JavaScript library, in web development, dynamically adding or removing rows from a table is a common requirement, especially when dealing with forms or data entry interfaces. Use CasesThis functionality is particularly useful in scenarios such as − Creating dynamic forms where users can add multiple entries (e.g., adding multiple email addresses, phone numbers, or product details). Building data entry interfaces where the number of rows is not fixed. ...

Read More

Create a media resources for media elements, defined inside video or audio elements in HTML5

Sindhura Repala
Sindhura Repala
Updated on 10-Feb-2025 736 Views

HTML5 supports five media elements, that are useful for creating media resources. The different media tags are , , , and . These tags are used to change the development, let us discuss each element in detail with an example − The tag To play videos on your web page, you can use the HTML element. This element provides a standard way to embed videos in a webpage. The simple code to embed a video is as follows − Your browser does not support the ...

Read More

How to programmatically navigate using React Router?

Rohit Kumar Dwivedi
Rohit Kumar Dwivedi
Updated on 20-Dec-2024 336 Views

In this article, we will learn how to programmatically navigate using React Router. Programmatic navigation enables changing the URL of an application without reloading the page. We can use several approaches to programmatically navigate in a React application using React Router. Approaches to navigate using React Router To programmatically navigate a React application, we can use several methods based on the version of React Router. In React Router v6, the useNavigate hook is introduced, which is recommended for programmatic navigation. By calling the navigate function returned from useNavigate, we can navigate to other routes. In React Router v5, the ...

Read More

How to pass data from child component to its parent in ReactJS?

Rohit Kumar Dwivedi
Rohit Kumar Dwivedi
Updated on 19-Dec-2024 402 Views

Passing data from one component to another is an essential part of building complex React applications. React props and states are fundamental concepts in React. Props stand for properties, which are used for passing data from one component to another, while State is used to manage data within a component. Prerequisites ReactJS Props ReactJS State Passing Data from Child Component to Parent You can easily pass data from a parent component to a child component with the help of props. Passing data from a child component to a ...

Read More

How to Loop inside React JSX?

Rohit Kumar Dwivedi
Rohit Kumar Dwivedi
Updated on 17-Dec-2024 382 Views

In this article, we are going to learn how to iterate on list or collection of data dynamically. However, directly using a loop is not a valid syntax in JSX. It is crucial to understand how to use loops inside React JSX. By iterating on arrays or any collections of data, we can render the component dynamically. Prerequisites ReactJS JSX Approaches to Loop inside React JSX The map() function and other methods can be used to repeat elements in JSX when we need to iterate over a list ...

Read More

How to Show or Hide Element in React?

Rohit Kumar Dwivedi
Rohit Kumar Dwivedi
Updated on 16-Dec-2024 386 Views

In this article, we are going to cover the implementation of dynamically showing or hiding elements in React. To understand this concept, you must be familiar with hooks in React. By leveraging hooks like useState, you can toggle and update the state to effectively control the visibility of an element. Approaches to Show or Hide Elements in React Using && Operator Using return null Using && Operator We have to change the state when a button is clicked, then it will determine the visibility of the element. With ...

Read More

What is prop drilling and how to avoid it?

Farhan Muhamed
Farhan Muhamed
Updated on 29-Nov-2024 488 Views

Prop Drilling is a common mistake beginners make while building React apps. It can cause reduced code readability and even performance issues for the app. In this article, I will explain what are props, prop drilling, and how to avoid prop drilling using context APIs. Table of Content What are Props? Prop Drilling Why to Avoid Prop Drilling? Fix Prop Drilling With Context API Prerequisites Good knowledge of React, useState Hook, and useContext Hook. ...

Read More

How to parse JSON Data into React Table Component?

Farhan Muhamed
Farhan Muhamed
Updated on 27-Nov-2024 770 Views

JSON files are used in APIs to transfer data from server to client in the form array. This transferred data needs to be displayed in the user interface, such as in tables or any other components. In this article, we will demonstrate how to display JSON data using a React Table. Prerequisites To display a JSON file in React.js, we need to have a basic understanding of the React.js library. Basic knowledge of React, useState Hook, and useEffect Hook. Ensure Node.js and React are installed on your system. ...

Read More

How to create an unique id in ReactJS?

Farhan Muhamed
Farhan Muhamed
Updated on 27-Nov-2024 753 Views

Unique IDs are used to differentiate multiple elements from each other, maintain the internal state of components, or create a key for user data. In this article, we will explain all the approaches to creating unique IDs for a set of elements in React JS. Approaches to Create Unique ID in React JS Here is the list of approaches for creating unique IDs in React JS, which we will be discussing in this article with stepwise explanations and complete example codes. Using uuid Library Using Timestamps ...

Read More

How to render an array of objects in ReactJS?

Ashutosh Kumar
Ashutosh Kumar
Updated on 24-Sep-2024 366 Views

Rendering lists of data is a common task in React applications, and rendering an array of objects in ReactJS is straightforward. When you have a variety of objects and you want to display them in your React component, there are several methods you can use. This article will walk you through the most common approaches using map(), for, for...of, and filter() methods. Approaches to Render Array of Objects in ReactJS Using map() Method Using for Loop Using for...of loop Using filter() Method ...

Read More
Showing 5921–5930 of 6,519 articles
« Prev 1 591 592 593 594 595 652 Next »
Advertisements