react-native-svg-charts icon indicating copy to clipboard operation
react-native-svg-charts copied to clipboard

fix: avoid warning of unrecognized props

Open jaulz opened this issue 6 years ago • 5 comments

Currently, the Path component generates warnings like these on web:

Warning: Received `false` for a non-boolean attribute `animate`.

If you want to write it to the DOM, pass a string instead: animate="false" or animate={value.toString()}.

If you used to conditionally omit it with animate={condition && value}, pass animate={condition ? value : undefined} instead.
Warning: React does not recognize the `animationDuration` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `animationduration` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Warning: React does not recognize the `renderPlaceholder` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `renderplaceholder` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

This PR removes the props before passing them on to the actual Path.

jaulz avatar Aug 07 '19 18:08 jaulz

Hi, why the fix has not been merged ? I have a lot of warnings of this type for react-native-web

dario30186 avatar Nov 06 '20 15:11 dario30186

I'm having this exact error too.

ryanbuckleyca avatar Nov 29 '20 21:11 ryanbuckleyca

@JesperLekland warnings still exist. Could you look into the PR and merge if it's ok?

amelnik92f avatar Dec 28 '20 20:12 amelnik92f

Facing same issue with web using react-native-web using following dependencies

"d3-shape": "^2.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-native-svg": "^12.1.1",
"react-native-svg-charts": "^5.4.0",
"react-native-web": "^0.15.0"

learncodingforweb avatar Apr 20 '21 06:04 learncodingforweb

Facing same issue with web using react-native-web using following dependencies

"d3-shape": "^2.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-native-svg": "^12.1.1",
"react-native-svg-charts": "^5.4.0",
"react-native-web": "^0.15.0"

learncodingforweb avatar Apr 20 '21 06:04 learncodingforweb