When working with JavaScript, understanding the concepts of scope and context is crucial for writing clean and efficient code. `Scope` determines the accessibility of variables and functions, while `context` refers to the value of the `this` keyword, representing the current object within which a function is executed. In this blog post, we will delve into these concepts, providing real-life examples to illustrate their practical implications.
React.js is a popular JavaScript library for building user interfaces. It's been a while now when react introduced hooks to manage state and lifecycle in functional components. React provide various built-in hooks for different purposes. But we can also create our own custom hooks to encapsulate and reuse complex logic between components.
SolidJS is a blazing-fast framework that dodges virtual DOM manipulation. Let's see how it stacks up against ReactJS, the industry standard, when it comes to flexibility, performance, community and developer productivity..
Infinite scrolling is a popular technique used in web development to provide a seamless user experience by loading content dynamically as the user scrolls down the page. One way to implement infinite scrolling in a React application is by using the IntersectionObserver API, which allows you to detect when an element enters or exits the viewport.
This article is a compilation of all the interviews I went through.
This article is a compilation of all the questions asked during my job hunt in product-based companies.
Creating a new React application requires careful consideration of various factors that will impact its scalability, collaboration and compatibility with your current and future tools and needs. These decisions include the type of app you are building (e.g. Complex web app, static landing site , content heavy blog site or an seo targeted e-commerce app), the level of server engagement, the number of developers working on the app, the reuse of components from other applications, and the build and deployment process. These decisions should be made with your end goal in mind and will require a significant amount of effort to ensure the success of the app.
Creating a project from scratch can help you better understand the underlying technologies and tools that are being used in your project. By setting up the project yourself, you will gain a deeper understanding of how the different pieces fit together and how they work, which can be valuable knowledge to have as you develop and maintain your project. It also gives you the opportunity to learn and experiment with new technologies and approaches.
A heap is a special type of tree-based data structure that satisfies the heap property: the value of each node is always greater than or equal to the value of its parent, with the exception of the root node, which has no parent. There are two types of heaps: min heaps and max heaps. In a min heap, the value of each node is always greater than or equal to the value of its parent, while in a max heap, the value of each node is always less than or equal to the value of its parent.
A binary search tree (BST) is a type of binary tree that is used for searching and sorting data. It is called a "search tree" because it can be efficiently used to search for the presence or absence of a particular element in the tree. It is called a "binary" tree because each node has at most two children.
A binary tree is a tree data structure in which each node has at most two children. Binary trees are commonly used to implement search algorithms, such as binary search.
A tree is a non-linear data structure that consists of nodes organized in a hierarchical structure. Each node in a tree has one or more child nodes, and is referred to as the parent of its child nodes. The node at the top of the tree is called the root, and the nodes without children are called leaf nodes.
An array is a data structure that stores a collection of elements in a contiguous block of memory. It allows us to store and access data efficiently, as elements can be accessed using their index, which is their position in the array.
A linked list is a linear data structure that consists of a sequence of nodes, where each node stores a reference to an object and a reference to the next node in the sequence. The last node in the list typically has a reference to null, indicating the end of the list.
An array is a data structure that stores a collection of elements in a contiguous block of memory. It allows us to store and access data efficiently, as elements can be accessed using their index, which is their position in the array.
Array searching is the process of looking for a specific element or value within an array. There are many different algorithms that can be used to search an array, and the choice of which one to use can depend on the size of the array, the type of elements it contains, and the desired performance characteristics. Some common array search algorithms include linear search and binary search.
Array sorting is the process of arranging the elements of an array in a specific order, such as ascending or descending order. The order can be based on the value of the elements, or on some other criterion such as the length of the elements in the case of strings.
Data structures and algorithms are integral components of software development, as they help to organize and manipulate data in an efficient manner. In this blog post, we will discuss some common data structures and algorithms in Javascript, as well as their time complexity, which refers to the amount of time it takes for an algorithm to complete its task.
Markdown is a lightweight markup language that is used to format text on the web. It was created in 2004 by John Gruber, a software developer, and Aaron Swartz, an internet activist, as a way to write and format text in a simple and straightforward manner.
CSS offers various ways to hide elements on a web page, but it's important to understand the differences between them in order to choose the right one for your specific use case. In this blog post, we will explore the display: none, visibility: hidden, and opacity: 0 properties and how they can be used to hide elements.
CSS preprocessors are tools that allow you to write more efficient and maintainable CSS code. They extend the capabilities of plain CSS by adding features such as variables, mixins, and functions, which can help you write more modular and scalable stylesheets.
As a web developer, it's important to understand the various HTTP status codes that can be returned from a server. These codes serve as a way to communicate the status of a request, and can range from successful responses to errors and even server issues.
React.js is a popular JavaScript library for building user interfaces. It allows developers to create reusable components and efficiently update and render them in response to user interactions. While it offers many benefits, it’s important to follow best practices to ensure a smooth and efficient development process.
Server-side rendering with React and Express is a powerful way to provide fast and dynamic page content to users. With server-side rendering, your React components are rendered on the server and then sent to the client. This allows for faster initial page loads and improved search engine optimization.
In this blog, I am going to show you how to create a simple todo application using vanilla JavaScript and Redux. This is a great way to learn the basics of Redux and how to use it in a practical way.
Redux is a powerful state management tool for JavaScript applications, allowing developers to manage and maintain application state in a predictable and efficient manner. In this blog, we will go over the steps to set up Redux in a vanilla JavaScript application.
Routing in Single Page Application is done internally using Browser History API. In this article we are going to add Routing to our application and restructure the project.
Lit Element is a simple library for creating fast, lightweight web components that work in any web page with any framework. In this article we are going to setup a Lit Element project using webpack.
Hey there! This is Vishal Sharma. I reside and work at Gurgaon, India. I am a Software Engineer and primarily works with JavaScript, ReactJS and NodeJS.