Skip to content

Why Do You Render Does not work with Vite + React #320

@AdityaPugalia

Description

@AdityaPugalia

I referred to one of the previous posts about it but the solution does not seem to work for me.
My vite config.js is as follows:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'

// https://vite.dev/config/
export default defineConfig({
  
  plugins: [tailwindcss(), react({
      jsxImportSource: '@welldone-software/why-did-you-render', }),],
  })

and WhydoYouRender.js is like this:

import React from 'react';
import whyDidYouRender from '@welldone-software/why-did-you-render';

if (process.env.NODE_ENV === 'development') {
  whyDidYouRender(React, {
    trackAllPureComponents: true,
    trackHooks: true
  });
}

I am using TableRowMemo.whyDidYouRender = true; but it still does not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions