Open in app

Sign In

Write

Sign In

Azeem Aleem
Azeem Aleem

52 Followers

Home

About

May 15

Stop Using Inline Styles in React

Always avoid passing inline Styles to any react components. It's a little tiny thing that causes a huge problem in our React app. To really understand this problem we will review the basic react fundamentals. Whenever a prop or state changes, react component re-render. function App(){ return{…

Inline Style

2 min read

Stop Using Inline Styles in React
Stop Using Inline Styles in React
Inline Style

2 min read


Oct 25, 2022

How to convert 12 hours into 24 hours in javascript | Problem-solving

Convert 12 hours time into 24 hours using Custom Javascript function function convert12to24(time12h) { const [time, modifier] = time12h.split(" "); let [hours, minutes] = time.split(":"); if (hours === "12") { hours = "00"; } if (modifier === "PM") hours = Number(hours) + 12; console.log(`${hours}:${minutes}`); return `${hours}:${minutes}`; } convert12to24("03:00 PM");

JavaScript

1 min read

JavaScript

1 min read


Nov 16, 2021

React Mapping React Life Cycles into UseEffect()

How to convert Life Cycles methods into useEffect hook? In this article, I’ll show you how to map react life cycles to useEffect hook. React Class components Life cycles List 1) componentDidMount() {} 2) componentDidUpdate(prevProps, prevState, snapshot) {} 3) shouldComponentUpdate(nextProps, nextState) {} 4) componentWillUnmount() {} 1- ComponentDidMount Pass an empty dependency…

Lifecycle Hook

2 min read

Mapping React Life Cycles into UseEffect()
Mapping React Life Cycles into UseEffect()
Lifecycle Hook

2 min read


Published in

JavaScript in Plain English

·Aug 24, 2021

How to Use Callback in the useState() Hook?

Use Callback function in React’s useState() If you are working with class components in React so maybe you are familiar with the callback function in setState(). setState(updateState, callbackFunction) this.setState({name: “Azeem Aleem”},()=>{ console.log(“State Response”,this.state.name); }) This callback function always calls after state update. But in functional components, the scenario is a little bit different.

JavaScript

1 min read

How to Use Callback in the useState() Hook?
How to Use Callback in the useState() Hook?
JavaScript

1 min read


Published in

JavaScript in Plain English

·Aug 20, 2021

Top 30 JavaScript and React Interview Questions & Answers for 2021

Some of the most-asked JavaScript and React interview questions which I extracted from different interviews. I am going to display all React and JavaScript questions and answers on my official LinkedIn Account. The most interesting thing is that you can get the answers from different angles and I hope that…

JavaScript

4 min read

Top 30 JavaScript and React Interview Questions & Answers for 2021
Top 30 JavaScript and React Interview Questions & Answers for 2021
JavaScript

4 min read


Jun 5, 2021

Web API vs Rest API

What is the difference between API and REST API? Not all APIs are REST, but all REST services are APIs So let’s start a common difference between API and REST API. API Stands for (Application Program Interface) and REST stands for (Representational State Transfer) The Function of API is to…

Webapi

2 min read

Web API vs Rest API
Web API vs Rest API
Webapi

2 min read


Jun 3, 2021

Pure and Impure Functions in JavaScript

Pure Functions A Pure function is a function that does not modify any external variable. And the Impure function modifies the external variable. A basic principle of functional programming is that it avoids changing the application state and variables outside its scope. Let see how it works in React. var s=10; exampleOfPureFunc=(a,b)=>{ …

Pure Function

2 min read

Pure and Impure Functions in JavaScript
Pure and Impure Functions in JavaScript
Pure Function

2 min read


Jun 2, 2021

Async await in JavaScript & React Js

What is Async/await in React Await” only works inside the Async functions. As you know that asynchronous function tasks are never dependent on each other. They never wait to complete the first execution and run parallel. so we are talking about “Await” today in this article. Async/await is a new way to write Asynchronous code…

Asynchronous

2 min read

Async await in JavaScript & React Js
Async await in JavaScript & React Js
Asynchronous

2 min read

Azeem Aleem

Azeem Aleem

52 Followers

MERN Stack Developer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams