React is all about building user interfaces. And to do that effectively, React provides ways for components to manage their lifecycles. This means that components can perform specific tasks… Read More
Theviyanthan KrishnamohanFollowFrontend Weekly--ListenShareChatGPT, Bard, and Bing are generative Artificial Intelligence chatbots, which on top of engaging in human-like conversations, can… Read More
Aborting JavaScript execution can help us to write more robust, secure, and efficient code by preventing unexpected errors and behaviors.Possible reasons why we need to abort JavaScript exec… Read More
Posted on Jul 2 Hooks were first introduced in version 16.8 of React, and they have revolutionized the way we write React code. With Hooks, you can easily extract stateful l… Read More
Quick Summary:
Avoiding common front-end mistakes is crucial for building high-quality websites & applications. Enhance your front-end development expertise by avoiding these mistakes… Read More
setInterval cleared without a var
Problem
I am using node.js to read a bunch of directories, as such async is really hurting me to keep track of it all.
I am using a setInterval to track a… Read More
Difference between Setinterval vs Settimeout JavaScript
Setinterval and settimeout in JavaScript are defined as functions that allow developers to build different kinds of alarm systems in… Read More
New Delhi: Whereas the current surge in Covid instances seen in India is basically as a result of Omicron, it doesn’t imply that Delta has weakened, consultants contend. India on Tu… Read More
A new study has found why short-lived lung infections can lead to long-lasting lung damage. The findings of the study were published in the ‘Journal of Clinical Investigation’.Th… Read More
Alternative ways to setInterval to animate elements ('diamond game')
Problem
I'm creating a diamond like game (hit 3 tiles same color to score) and i'm having an issue with animation produc… Read More
Persist setTimeout and setInterval across Node.js restarts
Problem
I set quite a few server-side timeouts with setTimeout and setInterval for each connected user that can last for 10-30 sec… Read More
Socket.io emits to non-existing room
Problem
I'm writing a game and using socket.io. Every map in the game is represented by a room in socket.io.
It works like this. User runs a client and… Read More
Node.js reloading module bug
Problem
I'm reloading a module this way:
require('./module.js'); // require the module
delete require.cache('/module.js'); // delete module from ca… Read More
KropBot is a little multiplayer robot you can control over the internet. Co-operate with random internet strangers to drive around
in circles and into walls.
If it is online, you can drive… Read More