question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu component generates React warnings after update to v4.16.x

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

open dev-tools and look into console

What is expected?

No warnings should be triggered

What is actually happening?

Warning: React does not recognize the `eventKey` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `eventkey` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    at p
    at ul
    at Overflow (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:42:32)
    at InheritableContextProvider (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:39:23)
    at Menu (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:76:32)
    at InternalMenu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:52:33)
    at Menu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:121:33)
    at div
    at div
    at ul
    at Overflow (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:42:32)
    at InheritableContextProvider (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:39:23)
    at Menu (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:76:32)
    at InternalMenu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:52:33)
    at Menu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:121:33)
    at div

and

Warning: React does not recognize the `warnKey` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `warnkey` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    at p
    at ul
    at Overflow (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:42:32)
    at InheritableContextProvider (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:39:23)
    at Menu (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:76:32)
    at InternalMenu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:52:33)
    at Menu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:121:33)
    at div
    at div
    at ul
    at Overflow (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:42:32)
    at InheritableContextProvider (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:39:23)
    at Menu (eval at Z (https://codesandbox.io/static/js/sandbox.abede95bc.js:1:101083), <anonymous>:76:32)
    at InternalMenu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:52:33)
    at Menu (https://lyz43.csb.app/node_modules/antd/es/menu/index.js:121:33)
    at div
Environment Info
antd 4.16.3
React 17.0.2
System MacOS
Browser Chrome

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:13
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
pkyeckcommented, Jul 12, 2021

@afc163 why wasn’t it a breaking change then? If something was working before and isn’t after an update that should have been a major release 😦

0reactions
AbhisekJScommented, Nov 15, 2021

I use this lines in files with the problem

delete otherProps.eventKey;
 delete otherProps.warnKey;

Please put an example

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Cannot update a component from inside the function ...
After npm upgrading to the latest React, I am getting the following warning in my console from the React Developer tools Chrome extension:...
Read more >
Can't perform a React state update on an unmounted ...
Warning : Can't perform a React state update on an unmounted component. Solution. You can declare let isMounted = true inside useEffect ,...
Read more >
How To Create Custom Components in React - DigitalOcean
Next, take out the template code created by Create React App, then replace the contents with new React code that displays a list...
Read more >
Test Renderer - React
Re-render the in-memory tree with a new root element. This simulates a React update at the root. If the new element has the...
Read more >
Troubleshooting | React Navigation
You can install the latest versions by installing the packages again (e.g. ... I'm getting an error "Unable to resolve module" after updating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found