nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.79k stars 1.49k forks source link

[BUG] - React does not recognize the `disableAnimation` prop on a DOM element. #3257

Closed uigywnkiub closed 4 months ago

uigywnkiub commented 4 months ago

NextUI Version

2.4.2

Describe the bug

In browser console

Warning: React does not recognize the disableAnimation prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase disableanimation instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Bug reproduce of all your site pages.

Expected behavior

As a user, I expected disableanimation prop in lowercase (maybe), but I am seeing a warning error log in console browser that cannot recognize attribute.

Screenshots or Videos

image

Operating System Version

Browser

Chrome

linear[bot] commented 4 months ago

ENG-1013 [BUG] - React does not recognize the `disableAnimation` prop on a DOM element.

wingkwong commented 4 months ago

Bug reproduce of all your site pages.

Can you share which site pages you were visiting? I didn't see this error.

uigywnkiub commented 4 months ago

Bug reproduce of all your site pages.

Can you share which site pages you were visiting? I didn't see this error.

localhost

wingkwong commented 4 months ago

please provide a minimal reproducible example

uigywnkiub commented 4 months ago

please provide a minimal reproducible example

https://github.com/nextui-org/nextui/assets/29861553/cd59218a-0a9b-4674-86ce-3887dda5022d

paperdiamond commented 4 months ago

I also started experiencing this after updating to 2.4.2

LeakedDave commented 4 months ago

This is happening on all Avatars on 2.4.2

wingkwong commented 4 months ago

@LeakedDave The fix will be available in the upcoming v2.4.3. Please use the canary version 0.0.0-canary-20240616172522 if necessary as a temp fix at the moment.

uigywnkiub commented 4 months ago

@LeakedDave please use the canary version 0.0.0-canary-20240616172522 as a temp fix at the moment.

When new version released?

wingkwong commented 4 months ago

@uigywnkiub Currently I don't have the exact date. We need to discuss internally first.

iFurySt commented 3 months ago

same question. looking forward to the new version being released. ❤️

bug-breeder commented 3 months ago

i have the same problem with 2.4.2, hope it will be fixed soon

dumbrosio commented 3 months ago

please use the canary version 0.0.0-canary-20240616172522 as a temp fix at the moment.

This does not work with individual adding components

uigywnkiub commented 3 months ago

please use the canary version 0.0.0-canary-20240616172522 as a temp fix at the moment.

This does not work with individual adding components

how to install this? and when comes the new release?

dumbrosio commented 3 months ago

please use the canary version 0.0.0-canary-20240616172522 as a temp fix at the moment.

This does not work with individual adding components

My bad, the issue was on User component, not Avatar.

"@nextui-org/user": "0.0.0-canary-20240616172522" works.

manglx commented 3 months ago

Hello guys, I was having this same error, but I changed the import from the specific component to the global components:

This produces the error for me: import { User } from "@nextui-org/user";

So I changed the import and the error is gone, and still works fine :) import { User } from "@nextui-org/react";

Hope this works for you in case you don't like seing errors like me lol. This is a temporary fix while we wait for the new version:)

dumbrosio commented 3 months ago

I was having this same error, but I changed the import from the specific component to the global components:

This produces the error for me: import { User } from "@nextui-org/user";

So I changed the import and the error is gone, and still works fine :) import { User } from "@nextui-org/react";

I actually think the type of import depends on the type of installation. If I understand what you are saying, I suggest you refresh your node_modules cache.

manglx commented 3 months ago

I was having this same error, but I changed the import from the specific component to the global components: This produces the error for me: import { User } from "@nextui-org/user"; So I changed the import and the error is gone, and still works fine :) import { User } from "@nextui-org/react";

I actually think the type of import depends on the type of installation. If I understand what you are saying, I suggest you refresh your node_modules cache.

Ohh, yes it depends on the installation, I didn't try refreshing node_modules cache, I'll try that to see if that also works and return to write if so, thank you so much :)

Edit: I tried refreshing the cache and did not work :(, so I think this time I'll stick with my solution.

am263129 commented 1 month ago

updating nextui and next.js will be solution of this problem? I am using these versions "@nextui-org/react": "^2.4.2", "next": "14.2.4",

wingkwong commented 1 month ago

@King-Mufasa latest version is 2.4.6. please upgrade to include the fix

am263129 commented 1 month ago

Thank you for your help. it works

uigywnkiub commented 1 month ago

@King-Mufasa latest version is 2.4.6. please upgrade to include the fix

The version still have the error in some cases.

wingkwong commented 1 month ago

@uigywnkiub please share some steps for us to reproduce

eaglit commented 1 month ago

@uigywnkiub please share some steps for us to reproduce

using NextUI/AvatarGroup with next/image will cause this error React does not recognize the disableAnimation prop on a DOM element.

for example:

<AvatarGroup isBordered size='sm'> {images?.map((image, index) => ( <Avatar key={index} src={image} radius='sm' ImgComponent={Image} imgProps={{ width: 150, height: 150, blurDataURL }} /> ))} </AvatarGroup>

i haven't tested yet but i guess same issue happens when using @nextui-org/user component with next/image

wingkwong commented 1 month ago

@eaglit please share a sandbox

Amanow01 commented 4 weeks ago

app-index.js:33 Warning: React does not recognize the Image prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase image instead. If you accidentally passed it from a parent component, remove it from the DOM element. at a at LinkComponent (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/link.js:121:19) at div at nav at Navbar (Server) at div at body at html at RootLayout (Server) at RedirectErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:74:9) at RedirectBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:82:11) at NotFoundErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:76:9) at NotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:84:11) at DevRootNotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/dev-root-not-found-boundary.js:33:11) at ReactDevOverlay (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js:87:9) at HotReload (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js:321:11) at Router (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/app-router.js:207:11) at ErrorBoundaryHandler (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:113:9) at ErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:160:11) at AppRouter (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/app-router.js:585:13) at ServerRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:112:27) at Root (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:117:11)



wingkwong commented 4 weeks ago

@Amanow01 please share the reproducible code.

uigywnkiub commented 3 weeks ago

@Amanow01 please share the reproducible code.

https://github.com/uigywnkiub/explend-app/blob/f1e8b1cbaf0bf0e98934dccb4a04cf7b6b2f84c8/app/ui/sidebar/user-profile-info.tsx

If I use Image, it get error disableAnimation props... so I used to regular img to avoid it.