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

Library broken on RN 0.69

Open KeaganStevens opened this issue 2 years ago • 3 comments

What is the problem?

Nothing renders/throws errors

When does it happen?

React native 0.69 deprecates ViewPropTypes which is used by the version of react-native-svg that this library depends on. installing deprecated-react-native-prop-types fixes error but then nothing renders at all

What actions are needed to reproduce the problem?

  • create new react native app
  • install this library
  • install deprecated-react-native-prop-types & fix import in react-native-svg
  • use any example from this repo

What platform?

  • [x] iOS
  • [ ] Android

react-native version: 0.69.4 react-native-svg-charts version: 5.30 react-native-svg version: 7.2.1

KeaganStevens avatar Aug 24 '22 11:08 KeaganStevens

@KeaganStevens Did you solve the problem?

minseokk avatar Sep 12 '22 12:09 minseokk

I was able to work around this by upgrading react-native-svg to the latest version. npm complains about the peer dependency not being met, but the application doesn't crash and properly shows the chart (in my case I'm showing a bar chart). I upgraded to [email protected].

cjbland avatar Oct 14 '22 20:10 cjbland

I was getting error:

viewPropTypes will be removed from React Native along with all other PropTypes. migrate to the deprecated-react-native-prop-types

But when I updated my react-native-svg the error was gone, hope this helps "react-native-svg": "^13.10.0", "react-native-svg-charts": "^5.4.0",

Garabed96 avatar Jul 07 '23 12:07 Garabed96