react-native-svg: version 13.0.0 rn 0.69.4 component property change not working
react-native-svg 13.0.0, react-native 0.69.4 component property change not working
Bug
<Star
fill={isFavorited}
color={isFavorited ? 'red' : theme.colorText}
/>
Temporary Fix
use different key
{ isFavorited ? <Star
key="unfavorite"
fill={isFavorited}
color={'red'}
/> : <Star
key="favorite"
fill={isFavorited}
color={theme.colorText}
/> }
Environment info
System:
OS: macOS 12.0.1
CPU: (4) x64 Intel(R) Core(TM) i7-7Y75 CPU @ 1.30GHz
Memory: 1.44 GB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.8.0 - /usr/local/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 8.13.0 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Java: 11.0.14.1 - /usr/local/opt/openjdk@11/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.4 => 0.69.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 15 (5 by maintainers)
@WoLewicki ok, I created https://github.com/react-native-svg/react-native-svg/issues/1859
I tried
Looks good
@Bardiamist I checked it and it is caused by the same issue as the one fixed in #1843, it should work fine for you after applying the change. Could you check it?
@linjdev on what platforms does the bug appear? @nextriot I will try and make a guide how to do it.