Skip to content

No logs or anything about WDYRΒ #280

@JamesDev21

Description

@JamesDev21

I follewed the setup instructions but I see no logs or anything. I am using CRA v5.0.1 and the react version is 18.2. WDYR is v7.0.1. Is this a compatibility issues? thanks

index.js:

import './whyDidYouRender'

import React from 'react'
import ReactDOM from 'react-dom/client'

// GLOBAL STYLES
import 'styles/global.module.scss'

// CONTEXT
import { AppProvider } from 'context/AppContext'

import App from './App'

const root = ReactDOM.createRoot(document.getElementById('root'))

root.render(
  <AppProvider>
    <App />
  </AppProvider>
)


whyDidYouRender.js:

import React from 'react';

if (process.env.NODE_ENV === 'development') {
  const whyDidYouRender = require('@welldone-software/why-did-you-render')
  whyDidYouRender(React, {
    trackAllPureComponents: true,
  })
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions