All Javascript posts

  • What Is the Type of NaN?

    What Is the Type of NaN?

    Updated on · 6 min read

    NaN, or "Not a Number", is a special value in JavaScript and TypeScript (as well as many other programming languages) that represents an undefined or unrepresentable value resulting from an arithmetic operation. It is often used as a placeholder for a missing numerical value or as a way to signify an error. However, what is the type of NaN in JavaScript?


  • Speed Up Your React Developer Workflow with Plop.js Code Generators

    Speed Up Your React Developer Workflow with Plop.js Code Generators

    Updated on · 8 min read

    As React developers, we often find ourselves setting up new components, connecting them with the existing infrastructure, or scaffolding applications. That's a lot of repetitive manual work, which even though doesn't happen that often, can be quite tedious and frankly, boring. Fortunately, there is a solution that can help us to automate this process and save time: JavaScript code generators.


  • Add a Dynamic Sitemap to Next.js Website Using Pages or App Directory

    Add a Dynamic Sitemap to Next.js Website Using Pages or App Directory

    Updated on · 6 min read

    In this post, we will explore how to add a dynamic sitemap to a Next.js website using the app directory. A sitemap is a file that lists all the pages of a website and helps search engines understand the structure of the site. By the end of this post, you will have a fully functional dynamic sitemap for your Next.js website.


  • Display Warning for Unsaved Form Data on Page Exit

    Display Warning for Unsaved Form Data on Page Exit

    Updated on · 4 min read

    Few things are more frustrating than losing all the unsaved work when accidentally leaving the page with a form. Therefore, adding a confirmation dialog asking a user to confirm a redirect when they have unsaved form changes is a good UX practice. By displaying this prompt, the user is made aware that they have unsaved changes and allowed to save their work or discard it before proceeding with the redirect.


  • The Most Common Mistakes When Using React

    The Most Common Mistakes When Using React

    Updated on · 5 min read

    Answering React-related questions on Stack Overflow, I've noticed that there are a few main categories of issues people have with the library. I've decided to write about the most common ones and show how to handle them in hopes that it'll be helpful to those new to React or anyone in general, who's struggling with its basic concepts.


Back to all posts