Category: React

  • use-client’ not working in Nextjs 13.4.19

    Use ‘use-client’ in Next.js 13.4.19 If you are facing issues with the ‘use-client’ functionality in Next.js version 13.4.19, you are not alone. Many developers have reported problems with this feature, but don’t worry, there are multiple solutions available to resolve this issue. In this blog post, we will explore these solutions and provide code snippets…

  • ES6 – Is there a way to filter deeply nested object by a search term

    ES6 – Is there a way to filter deeply nested object by a search term When working with deeply nested objects in JavaScript, it can sometimes be challenging to filter and extract specific data based on a search term. However, with the introduction of ES6, there are multiple approaches you can take to achieve this.…

  • TS Backend Dev: `prisma generate` cannot find installed `@tsed/prisma` package

    TS Backend Dev: prisma generate cannot find installed @tsed/prisma package If you are a TypeScript backend developer using Prisma and facing the issue where the prisma generate command cannot find the installed @tsed/prisma package, you’re in the right place. In this blog post, we will explore a couple of solutions to resolve this problem. Solution…

  • Why Typescript does not respect expected argument type parameter in generic method?

    Why Typescript does not respect expected argument type parameter in generic method? When working with TypeScript, you may encounter a situation where the expected argument type parameter in a generic method is not being respected. This can be confusing and frustrating, but there are a few reasons why this might happen and some solutions you…

  • Specifying type of inline object in TypeScript

    Specifying the Type of an Inline Object in TypeScript When working with TypeScript, it is important to specify the type of variables and objects to ensure type safety and catch potential errors early on. One common scenario is when you need to specify the type of an inline object. In this blog post, we will…

  • how do I display the date of when a blog was created in nextjs and typescript

    How to Display the Date of When a Blog Was Created in Next.js and TypeScript When building a blog using Next.js and TypeScript, it’s important to display the date of when each blog post was created. This not only provides useful information to readers but also adds a professional touch to your website. In this…

  • Defining Typescript types for CommonJS module

    Defining TypeScript Types for CommonJS Module If you are working with TypeScript and using CommonJS modules, you may encounter situations where you need to define types for CommonJS modules. In this blog post, we will explore different solutions to this problem. Solution 1: Using the `import` statement One way to define types for CommonJS modules…

  • Where do component-specific .ts files live in a React application?

    Where do component-specific .ts files live in a React application? When working with TypeScript in a React application, organizing your codebase is crucial for maintainability and scalability. One important aspect of code organization is determining where component-specific .ts files should live. In this blog post, we will explore the different options available and provide code…

  • NextJS can´t build

    NextJS can’t build If you are encountering issues with building your NextJS application, don’t worry, you are not alone. Building a NextJS project can sometimes be tricky, but there are a few common solutions that can help you overcome this problem. In this blog post, we will explore some of the possible causes and their…

  • When adding multiple images to a product, each image creates its own productId instead of belonging to the same productId

    When adding multiple images to a product, each image creates its own productId instead of belonging to the same productId When working with TypeScript, you may encounter a situation where adding multiple images to a product results in each image having its own productId instead of belonging to the same productId. This can cause issues…