react-native-svg-charts
react-native-svg-charts copied to clipboard
fix: avoid warning of unrecognized props
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.
Hi, why the fix has not been merged ? I have a lot of warnings of this type for react-native-web
I'm having this exact error too.
@JesperLekland warnings still exist. Could you look into the PR and merge if it's ok?
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"
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"