TagJavascript

useMemo vs React.memo: Which is better?

u

What is React.Memo? React.Memo is a HOC (Higher Order Component) in react js which accepts a react component & a function that updates the component with the help of props using memoization. React.Memo keeps the track of the react component between the renders. A small example to make you understand React.Memo concept, What is useMemo? useMemo is the hook in react js that accepts a function...

Render optimization in React app: Memoization using useMemo

R

What is the useMemo hook? The useMemo hook is one of the additional hooks that are implemented in React. The purpose of the useMemo hook is to memoize the return value of a function i.e it executes some function & remembers the value of that function. Syntax: – const memoVal= useMemo(funcThatReturnsValue,arrayDependencies) useMemo hook accepts two arguments i.e., the first argument is...

Realtime Updates WIth Mongodb

R

What do we mean by a real-time database?As the name suggests if we get updates from our database as soon as they occur, ie, in real-time, we call it a real-time database. The data with clients are in constant sync with the database. What are some use cases for real-time updates?– Real-Time Notifications – Real-Time Analytics – Event-Driven Architecture– Reactive Systems...

State Management Lifecycle in React

S

What is State? To make React Component Classes dynamic State is used.  The state of a component is an object which holds information which may change the lifetime of the component. State v Props Once Props are set they can’t be changed so Props are immutable  The state can hold data that may change over time so the state is observableProps can be used in  function or class componentsThe state is...

Modern Redux Development using Redux tookit

M

Introduction: This blog explains how you can build an application using the react-redux with a redux toolkit. This is the modern React Redux tutorials with the Redux toolkit. Things are changing in front-end application development. What we have been using to develop a front-end application is frequently switching to build things faster and more efficiently. One of them is redux, which handles...

Async / Await Vs Promises

A

In this blog, we are learning about the concepts of javascript that handle asynchronous operations. This includes promises & async / await to handle operations. we will learn how we can use it or Part from that what is the difference between them? while writing code, let’s go we will find out. Promises:- A promise in javascript is similar to a promise in real life. it’s the same...

Top 6 Libraries You Must Know As A React Developer 

T

React is a library that was made by Meta(Facebook), and it has become one of the most popular frameworks in the world. This blog will cover some top libraries that are crucial for beginners to know when working with React. These libraries have gained popularity due to their performance, user interface and above all the momentum they have gained in the developer community. The React Native...

Redux vs Context API : How to choose?

R

Bit confused, about when, how, and where to use redux and context API. Let’s take a brief look. We have a simple application named as Movie app. In that movie app, we have basic three-component search, login, and movies. If we want to share data between these components then quite easy than nested child components in one big app that leads to prop drilling. So, to solve the prop drilling issue...

Managing Redux Side Effects Using Redux Saga

M

If you have previously used Redux in a React project, you will eventually need to handle side effects (asynchronous) such as API requests or setting timeout and intervals since they are necessary while developing features for a “complex online application.” The Redux design takes an action and a state and then returns a new state to offer predictable state change. There are no built...

PROGRESSIVE WEB APPS IN REACT

P

Progressive Web Apps(PWA) are the web apps which are dynamic and can be run offline which means at standalone. The benefits of Progressive web apps in its usage and other factors are as follows: performance of the app; The ability to work online means with internet connectivity or offline means without internet connectivity. specific to platform capable to install or installable. Create a React...

Category