Giter Site home page Giter Site logo

[Bug]: console.js:213 Warning: React does not recognize the `dataSlot` prop on a DOM element. Since update 5.0.1 to 5.1.0 about react-icons HOT 11 CLOSED

barbalex avatar barbalex commented on May 23, 2024 12
[Bug]: console.js:213 Warning: React does not recognize the `dataSlot` prop on a DOM element. Since update 5.0.1 to 5.1.0

from react-icons.

Comments (11)

barbalex avatar barbalex commented on May 23, 2024 6

So it seems the problem is in react-icons: tailwindlabs/heroicons#1164 (comment):

Hey, this isn't our issue. The library is copying/republishing our icons but not handling them right:

const newName = name.startsWith("aria-") ? name : camelcase(name);

That script should not convert any data attributes to camel case.

From looking at this code I feel that besides aria-, also data--attributes should not be camel-cased.

from react-icons.

kamijin-fanta avatar kamijin-fanta commented on May 23, 2024 6

v5.2.0 released!

from react-icons.

peroperje avatar peroperje commented on May 23, 2024 3

The same situation

from react-icons.

pdchouse avatar pdchouse commented on May 23, 2024 3

same here with nextjs v14.2.1

from react-icons.

ochoadan avatar ochoadan commented on May 23, 2024 2

Getting it with: import {HiOutlineEnvelope} from "react-icons/hi2";
Solution: use other icons.

from react-icons.

nejcm avatar nejcm commented on May 23, 2024

It is not just that icon. I am getting it with multiple different ones.

from react-icons.

luc345 avatar luc345 commented on May 23, 2024

Same issue,

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

thanks

from react-icons.

michaelboke avatar michaelboke commented on May 23, 2024

I noticed it too, i'm using a lot of the hero icons v2

I checked the hi2 repo and found for example this
https://github.com/tailwindlabs/heroicons/blob/master/svgo.20.solid.mjs has a custom attribute for the data-slot = icon. Is there a way to ignore or unset those properties

from react-icons.

barbalex avatar barbalex commented on May 23, 2024

I noticed it too, i'm using a lot of the hero icons v2

I checked the hi2 repo and found for example this https://github.com/tailwindlabs/heroicons/blob/master/svgo.20.solid.mjs has a custom attribute for the data-slot = icon. Is there a way to ignore or unset those properties

Thanks @michaelboke , I created an issue over there: tailwindlabs/heroicons#1164.
Though: they use data-slot, not dataSlot. So maybe the issue is in react-icons after all?

from react-icons.

ashish-ts avatar ashish-ts commented on May 23, 2024

Got same issue after updating react-icons from 5.0.1 to 5.1.0

For temporary solution downgrade it to 5.0.1 and the issue is resolved.

from react-icons.

LZL0 avatar LZL0 commented on May 23, 2024

v5.2.0 released!

Thank you!

from react-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.