Memoization in JavaScript

Memoization in JavaScript What is Memoization In programming, memoization is an optimization technique that can be used to make application faster by saving previously calculated results into the cache and retrieving that same result from the cache the next time when it needed instead of calculating it again. In simple words, to memoize a function […]

Refrential Equality

Referential Equality: Referential equality of two objects means that they point to the exact same object in memory, i.e. they use the same reference. Structural equality on the other hand means that two objects have the same value. We know that when we create a variable or object or array some memory location will be allocated to it.  Structural equality The structural equality […]

React — UseContext Hooks

  Prop Drilling Prop drilling is the process to get data to parts of the React Component tree, and Context API provides a way to share values between different Components, without having to explicitly pass a prop through every level. The context API allows better performance. UseContext “useContext” hook is used to create common data […]

JavaScript Closure

                       JavaScript Closure 1.The scope The scope is a space where we can access variables. Now you know two interesting things: Scopes can be nested The variables of the outer scope are accessible inside the inner scope   2. The lexical scope The lexical scoping means that inside the inner function (child) scope you can […]

What is JavaScript Event Loop ?

JavaScript Event loop   JavaScript is a single-threaded programming language. Single-threaded means it can do one thing at a time. In Synchronous operation code will be executed line by line In Asynchronous operation means that a process operates independently of other processes. Example: if we use SetTimeout() function, a web API given by browser. which […]

What are React Hooks ?

MotivationEach lifecycle method often contains a mix of unrelated logic. Mutually related code that changes together gets split apart, but completely unrelated code ends up combined in a single method. We have to understand how this works in JavaScript, which is very different from how it works in most languages. We have to remember to […]

React Virtual DOM

In this article: Concept review: What is DOM? How DOM works Drawbacks of DOM manipulation Exploring the virtual DOM in React What is Virtual DOM How Virtual DOM works Batch update How React works with the virtual DOM What is DOM JavaScript makes the HTML page active and dynamic via the DOM. to make an HTML […]