Let’s Code Better

  • Next.js Protected Routes: Sample Application, Use Cases, and Solutions

    In this tutorial, we will discuss a very important aspect of web applications and how to implement protected routes in the Next Js application. Protected routes play a key role in managing user access and ensuring the security of web applications. This article will dive deep into the concept of protected routes in Next.js, illustrating…

    Read more: Next.js Protected Routes: Sample Application, Use Cases, and Solutions
  • 3 Solutions for ‘window is not defined’ Error in Next.js with Examples

    While working on the Next Js project, you may have faced an issue saying ‘window is not defined’. Next js provides a powerful framework, that helps to create server-side rendered applications and that is by using Javascript. But most of us face this ‘window’ or ‘document’ as an undefined issue because these are client-side available…

    Read more: 3 Solutions for ‘window is not defined’ Error in Next.js with Examples
  • NextJS with React Testing Library – Sample App Tutorial

    In the world of web development, numerous technologies and frameworks are getting added to the stack. Among these, NextJS and React have made a good place for themselves due to their powerful features and flexibility. In this tutorial, we will revolve around these two technologies and put focus on testing in NextJS using the React…

    Read more: NextJS with React Testing Library – Sample App Tutorial
  • Fetch Google Search Console Report in Excel with Python to Top Growing Pages

    In this tutorial, you will learn how to fetch page link metrics like page rank, impressions, clicks and CTR from Google Search Console and download it to an xlsx Excel file. Using the downloaded xlsx report we can easily compare the previous data and compare it with the latest to see which pages are showing…

    Read more: Fetch Google Search Console Report in Excel with Python to Top Growing Pages
  • Using ^ and ~ in Package.json Version Specifiers – A Complete Guide

    When managing dependencies in a Node.js project, it’s important to specify the version of the packages you want to use. This helps to ensure that your project is using a compatible version of each package and reduces the risk of unexpected behavior caused by using an incompatible version.

    Read more: Using ^ and ~ in Package.json Version Specifiers – A Complete Guide
  • [Angular 16] Virtual Scrolling with CDK: The Ultimate Tutorial

    Angular Virtual Scrolling with CDK - The Ultimate Tutorial

    Angular Virtual Scrolling is one of the game-changer features to deal with extensive lists of items. In this guide, we will discuss Angular Virtual Scrolling focusing on the Angular CDK Virtual Scroll package and its core component, cdk-virtual-scroll-viewport. Moreover, we will add the required animations using CSS to make it look more awesome in your…

    Read more: [Angular 16] Virtual Scrolling with CDK: The Ultimate Tutorial
  • Next js Redirects – Client, Server Side and External Redirection Methods!

    We will walk through a detailed guide on variour type of Redirection methods in Next js with various methods. In Next js, we can handle the redirects both on the Client-side as well as on the Server-side. In addition to this external redirects to open the link out of the application in a new tab…

    Read more: Next js Redirects – Client, Server Side and External Redirection Methods!
  • Next.js and Prisma – Setup Schema, APIs and Error handling with Examples

    In this tutorial, you will learn about Prisma and how we can use it in our Next js application and what are its advanced use cases.

    Read more: Next.js and Prisma – Setup Schema, APIs and Error handling with Examples
  • [Resolved] ‘ComponentFactoryResolver’ is deprecated While Loading Dynamic Components

    In Angular, the ComponentFactoryResolve class used to be used to create dynamically load components before Angular 13. With the release of Angular 13, the ComponentFactoryResolver class is marked as deprecated when you see its code class comments:

    Read more: [Resolved] ‘ComponentFactoryResolver’ is deprecated While Loading Dynamic Components
  • Next JS getserversideprops Pagination Using React Paginator & NProgress

    In this article, you will learn how to implement server-side pagination in Next js with getServerSideProps. We will be using the react-paginate to create a pagination component. By setting up the server using ExpressJS API and the database using PHPMyAdmin we will create a full workflow and working example. Moreover, you will also learn how…

    Read more: Next JS getserversideprops Pagination Using React Paginator & NProgress
  • [Angular] “error:0308010C:digital envelope routines::unsupported” Error Fixed

    The “error:0308010C:digital envelope routines::unsupported” error is a common issue for developers working with Node.js versions 17 and later, as these versions introduce significant changes in OpenSSL. In this comprehensive guide, we’ll walk you through the steps to diagnose and fix this error.

    Read more: [Angular] “error:0308010C:digital envelope routines::unsupported” Error Fixed
  • Facebook Login in React Application Tutorial & Example

    Integration of Facebook authentication and login in react application; In this React tutorial, you will learn how to implement the Facebook login button in react by utilising the react-facebook-login plugin.

    Read more: Facebook Login in React Application Tutorial & Example
  • Angular Change Text Color Based on Value Dynamically

    In this Angular article, we will discuss a simple yet useful feature to dynamically change the color of a text by clicking the button in the App component. To accomplish this we will update the HTML’s native style attribute of the text element. This way of updating the element’s style property can be used in…

    Read more: Angular Change Text Color Based on Value Dynamically
  • Laravel Disable Auto Discovery – 3 Simple Steps to Manage Package Auto Discovery

    In this guide, we will dive into the concept of Auto Discovery in Laravel and discuss its benefits. Most importantly how to disable it in Laravel. Auto Discovery is introduced in Laravel 5.5. Auto-discovery feature allows to automatically register package service providers and services which eliminates manual configuration needs. It helps to speed up the…

    Read more: Laravel Disable Auto Discovery – 3 Simple Steps to Manage Package Auto Discovery
  • Debugging getServerSideProps in Next.js – Various Techniques for Browser or Server Only

    Next js provides a number of features which helps to create a robust application. One such feature is getServerSideProps, which is a data fetching method that runs on the server side every time we make a request. This article will walk you through various methods and techniques on how to debug getServerSideProps in Next.js with…

    Read more: Debugging getServerSideProps in Next.js – Various Techniques for Browser or Server Only
  • How to Get Array Length Using For Loop in Python?

    How to get the length of a list item using for loop in Python; In this tutorial, we will discuss how to get the length of array list using the for a loop.

    Read more: How to Get Array Length Using For Loop in Python?
  • Get Current URL in Next.js: A Comprehensive Guide

    Get Current URL in Next.js

    Fetching the current URL of a webpage is a very common requirement whether for building navigation links, user analysis or implementing dynamic routing. In this guide, we will discuss how to get the current URL in the Next js app, even if it has hash, query params or dynamic parameters in the URL. We will…

    Read more: Get Current URL in Next.js: A Comprehensive Guide
  • Python 3 – How to Typecast to string, int, float, complex ?

    In Python, we can convert the type data values to multiple types using the typecasting functions as shown below: List of Typecasting Functions in Python: str() : Convert value to string type. int() : Convert value to integer type. float() : Convert value to float type. complex() : Convert value to complex type.

    Read more: Python 3 – How to Typecast to string, int, float, complex ?
  • Loading Spinner in Next.js – Axios Interceptor & Routing Navigation Loader

    In this guide, we will learn how to implement a custom Next JS Loading Spinner component. This Loading Spinner can easily be customized according to your theme. Also, we will discuss how to easily integrate it with Routing transition and HTTP calls as Axios-based Interceptors to indicate users with Spinner loader.

    Read more: Loading Spinner in Next.js – Axios Interceptor & Routing Navigation Loader
  • Next.js i18n – Add Internationalization with Example Tutorial

    In this guide, we will discuss how to add the Internationalization or i18n feature in the Next js application, which will have a select box to easily switch between various languages and also update the text on the page right away. Having a language switch option or translation feature is a very important aspect of…

    Read more: Next.js i18n – Add Internationalization with Example Tutorial
  • Python Range Function with a Focus on Negative Steps

    The Python range function is a built-in function that allows us to generate a sequence of numbers. It is a powerful tool which is used in for loops to iterate over a sequence of numbers.

    Read more: Python Range Function with a Focus on Negative Steps
  • Exploring Godot Python: A Comprehensive Guide

    In this article, you will learn about Godot Python, it is a powerful tool for game development. We will learn how to set up an environment to create and develop games using Godot Python with examples as well. We will also get to know its advantages and disadvantages over other tools like Unity. Godot Python…

    Read more: Exploring Godot Python: A Comprehensive Guide
  • React Tutorial- How To Show Loading Spinner On Click Example

    Sometimes, it happens that nothing is being shown when the submit button is clicked and the form is processed. So, in this tutorial, we will get to see how to show a loader or spinner the submit button while the form is processing. Also, we will be learning how to disable the button from clicking…

    Read more: React Tutorial- How To Show Loading Spinner On Click Example
  • Handling CORS in Next.js: Best Practices and Solutions

    Handling CORS in Next.js: Best Practices and Solutions

    Cross-origin resource sharing or CORS is a critical security feature provided by web browsers that prevent from making requests to other domain that are not the same as the current one from which the web pages is served. CORS is a very important feature in terms of the security of the application. But sometimes it…

    Read more: Handling CORS in Next.js: Best Practices and Solutions
  • Next js Cookies – Handling Client-Side or Server-Side State with Examples

    In this article, we will discuss in detail Next Js Cookies management and how we can handle cookies at Client-Side or Serveri-Side in the Next js application with examples. We will explore what are its advantages, use cases and best practices to make their usage more secure and optimal.

    Read more: Next js Cookies – Handling Client-Side or Server-Side State with Examples