react-native-svg: Error updating property 'strokeWidth' in RNSVGPath
Just updated RN to 0.50.4 and react-native-svg to 6.0.1-rc.0 and getting the following error
Error while updating property 'strokeWidth' in shadow node of type: RNSVGPath
TypeError: expected dynamic type 'double', but had type 'string'
the error comes from
StaticTransformConfig transformConfig = new StaticTransformConfig();
transformConfig.mProperty = property;
transformConfig.mValue = transformConfigMap.getDouble("value");
Any ideas, what causing it? The most I’ve used strokeWidth is in the following form strokeWidth="2"
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 29
I have the same issue on Android only (iOS works fine) running react-native
0.50.4and react-native-svg6.0.1-rc1with the following SVG:Reverting back to react-native-svg
5.5.1resolves the issue as well.I don’t know how but after adding and linking an unrelated project, this started working for me on iOS. React-native development very often feels like trying to juggle sand.
I’ve made a PR: https://github.com/expo/expo-sdk/pull/102
@dustinsavery I can verify this happens on RN
0.50.4andreact-native-svg 6.0.0. Reverting back to5.5.1resolves this issue.I think you have to eject from expo if you want to change the react-native-svg version, as otherwise you cannot change the native build. Expo has a prebuilt version, which seems to be pre v6