PRoMises chaining
const wait = function (second) { return new Promise(function (resolve) { setTimeout(resolve("WHo??"), second * 1000); }); }; wait(1) .then((r) => { console.log("I am a first call"); console.log(r); return wait(3); }) .then(...
Search for a command to run...
Articles tagged with #javascript
const wait = function (second) { return new Promise(function (resolve) { setTimeout(resolve("WHo??"), second * 1000); }); }; wait(1) .then((r) => { console.log("I am a first call"); console.log(r); return wait(3); }) .then(...
question by botplayer : WHy we should never update the state in the render logic (example like data fetching)? Answer: IT causes infinite re-rendering. you can check at the network section, in the no. of request where request kept increasing infinite...

In React’s older class-based components, the render() method is essential. It’s the only method you must include, and it’s responsible for displaying what the component looks like on the screen. The render() method can read the component’s props and ...
The infamous "double undefined" issue! This is a common gotcha in React, and it's not specific to your code. It's related to how React handles the this context in functional components. In a functional component, this is not bound to the component in...

this in different places
