ReactJS Fragments

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

450 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

Cleaning Up with useEffect Hook in ReactJS

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

723 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

Optimizing ReactJS Applications

Rahul Bansal
Updated on 18-Mar-2021 11:10:34

249 Views

In this article, we are going to see the methods to optimize our React application.To create a real-world React application, optimized code is greatly required to enhance the performance. There are several ways to optimize a React application but some of the most preferred ways are mentioned below −MemoizationIt is the technique used to speed up the application by storing the result as the cache and only calling the function again when the inputs are changed otherwise the cached result is returned.Use React.memo() for functional components. This method is used to only re-render the component if the props passed to ... Read More

What is Scalability Testing

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

468 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

Lazy Loading in ReactJS

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

4K+ Views

In this article, we will learn how to lazily load the pages of our application to make our React application more optimized.React apps are bundled with the preinstalled bundlers like webpack before making the React application to be production ready. When this bundled project is loaded, it loads the whole source code at once, even those pages which are rarely visited by the user. So, to prevent the entire loading of the application at once, we use the concept of lazy loading to decrease the DOM load time and to increase the speed of the application.Syntaxconst OtherComponent = React.lazy(() => ... 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 an Attack Vector?

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

541 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

Use Google Chrome Virus Scanner

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

294 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