useAutoScroll custom hook in ReactjsIntroduction You might have seen on streaming platforms such as youtube.com or twitch.com where there are live chat feeds, whenever a new chat comes, mainly two things happen:1. Auto-scrolls at the bottom2. If a user scrolls the feed on the top then ...Sep 1, 2023 · 4 min readrohanmathur.hashnode.dev
Generate dynamic meta-tags for your client-side rendered web appWhy do we need this? Let's consider a youtube video example, whenever we share a video on any social media platform say twitter.com, the link also shows some images and text giving more context to what that video is all about. See the below example. ...Sep 1, 2023 · 4 min readrohanmathur.hashnode.dev
Prototypes and Classes in JavaScriptPrerequisite This blog assumes that you’re somewhat familiar with the objects and this keyword in javascript. If not, then please go through them once. Introduction Let's start with objects, so suppose we are building a game where each user object ha...May 12, 2022 · 6 min readrohanmathur.hashnode.dev
Method borrowing in JavaScript.So let's start with what method borrowing in javascript is? where we can use it? and how to do it? As the name says method borrowing, we can borrow i.e use methods of one object with another object. Suppose we want to use some methods which are prese...May 11, 2022 · 3 min readrohanmathur.hashnode.dev
Functional programming in JavaScriptWhat Is Functional Programming? Functional Programming is a programming paradigm where we write our code as pure functions and avoid side effects. So functional programming says that a function: should be a pure ( i.e does not have any side-effec...Mar 5, 2022 · 4 min readrohanmathur.hashnode.dev