ReactJS – bind() method

Rahul Bansal
Updated on 18-Mar-2021 11:31:09

5K+ Views

In this article, we are going to see how to pass arguments to a function in a React applicationReact has a predefined bind() method which we can use to pass the arguments to a function in the class based components.Syntaxthis.func.bind(this, [args...])It accepts two parameters, this keyword and the arguments. 'this' keyword is used to pass the reference to that function while the second parameter is passed as arguments to the function.ExampleIn this example, we will build a React application that passes the arguments to a function when a button is clicked.App.jsximport React from 'react'; class App extends React.Component { ... Read More

ReactJS – Axios Interceptors

Rahul Bansal
Updated on 18-Mar-2021 11:29:48

11K+ Views

In this article, we are going to learn how to intercept every request or response that is being sent by Axios Interceptors in a React application.Axios interceptors are the default configurations that are added automatically to every request or response that a user receives. It is useful to check response status code for every response that is being received.ExampleIn this example, we will build a React application that automatically checks and logs the status code that is sent by the server while sending a POST request from our React application.We have to set all the configuration in the most global ... Read More

ReactJS – Fragments

Rahul Bansal
Updated on 18-Mar-2021 11:23:38

495 Views

While building a ReactJS application, all the JSX code needed to be wrapped down inside a parent tag.ReactJS Fragments were introduced with React 16.2 version to remove the need to define an extra tag which also takes extra memory.Without FragmentsThe following sample code shows how to create a simple React application without React Fragments.ExampleApp.jsximport React from 'react'; class App extends React.Component {    render() {       return (                       TutorialsPoint             Simply Easy Learning               ... Read More

ReactJS – Component vs PureComponent

Rahul Bansal
Updated on 18-Mar-2021 11:22:17

1K+ Views

In this article, we are going to see the difference between Component and PureComponent. In ReactJS, Components are widely used to make an App more efficient and effective to use.ReactJS provides two different ways to use components – Component or PureComponent.ComponentIt is the type of component which re-renders itself every time when the props passed to it changes or its parent component re-renders.Our first component in the following example is App. This component is the parent of the Comp1 component. We are creating Comp1 separately and just adding it inside the JSX tree in our App component. Only the App ... Read More

ReactJS – Cleaning up with useEffect hook

Rahul Bansal
Updated on 18-Mar-2021 11:20:13

780 Views

In this article, we are going to see how to clean up the subscriptions set up in the useEffect hook in the functional component.Once the effects are created, then they are needed to be cleaned up before the component gets removed from the DOM. For this, cleaning up effect is used to remove the previous useEffect hook’s effect before using this hook of the same component again.SyntaxuseEffect(()=>{    return ()=>{} } ,[]);ExampleIn this example, we will build a React application which displays the coordinates of the mouse pointer when it is moved over the screen. For this to implement, we ... Read More

What is Scalability Testing?

Vineet Nanda
Updated on 18-Mar-2021 11:06:06

517 Views

What is Scalability Testing and Learn with ExampleA system/application must have the capability to function flawlessly under excessive load. Scalability testing features the process where the efficiency of a system is tested based on a growing number of user requests, data volume, transactions, and user traffic. The developers identify the points where the system stops responding to changes and dig deeper to find its reasons.Salient features of Scalability TestingIt tells you how the application behaves under heavy loadIt let you know the limitation of the app in terms of user experienceIt helps you determine the efficiency and limits of the ... Read More

What is a Backdoor Attack?

PranavBhardwaj
Updated on 18-Mar-2021 11:04:11

8K+ Views

Cybercriminals use numerous ways to take advantage of the vulnerabilities in the operating system or applications to infiltrate the device or network. One such method is using the Backdoor Attack.In this post, we would discuss what Backdoor Attack is, its types, and how to stay safe from Backdoor Attacks.What is a Backdoor Attack?In cybersecurity terms, a Backdoor Attack is an attempt to infiltrate a system or a network by maliciously taking advantage of software's weak point.Backdoors allow the attackers to quietly get into the system by deceiving the security protocols and gain administrative access. It is similar to the real-life ... Read More

What is Attack Vector?

PranavBhardwaj
Updated on 18-Mar-2021 11:03:44

595 Views

To infiltrate into a system, cybercriminals use different methods; Attack Vector is one of them.In this post, we would know in detail what Attack Vector is, why and how do hackers exploit it, and how to protect your system against Attack Vectors.What is Attack Vector?Atack Vector is a malicious term used for describing the path or the method used by cybercriminals to get entry into a system. It allows the attackers to exploit the vulnerabilities and loopholes to deploy malware and conduct other malicious activities on the system.Once the cybercriminals get an entry into the system using the attack vector, ... Read More

Import Files and Images in ReactJS

Rahul Bansal
Updated on 18-Mar-2021 11:01:08

5K+ Views

In this article, we are going to see how to import CSS Files, images and functions defined in other folder to the main App.js file.In React, we need to dynamically import the images from their folder.ExampleIn this example, we will define a project structure with the images and components already defined in the assets and components folder and then we are going to dynamically import them in our main App.js file.Project StructureApp.jsimport React from 'react'; import MyComponent from './components/my -component.js'; import TutorialsPoint from './assets/img.png'; const App = () => {    return (           ... Read More

How to use Google Chrome Virus Scanner?

PranavBhardwaj
Updated on 18-Mar-2021 11:00:30

331 Views

Google Chrome is unarguably the best internet browser across every platform. It provides its users with a large number of advanced features that enhance their web browsing experience. It is fast, feature-rich, and comes with an excellent user interface.Many of you might not be aware of the fact that the Google Chrome browser in the Windows operating system is capable of performing malware scanning on the entire system.Yes, you can detect and remove the virus and other malware from your system using the Chrome Antimalware feature.In this post, we would know how to use the Google Chrome virus scanner to ... Read More

Advertisements