question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

version 13.0.0 rn 0.69.4 component property change not working

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Bardiamistcommented, Aug 22, 2022

@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?

I tried

"react-native-svg": "git+https://github.com/react-native-svg/react-native-svg#@wolewicki/fix-android-components-not-updating"

Looks good

Read more comments on GitHub >

github_iconTop Results From Across the Web

version 13.0.0 rn 0.69.4 component property change not working
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...
Read more >
react-native-svg - npm
SVG library for react-native. Latest version: 13.6.0, last published: a month ago. Start using react-native-svg in your project by running ...
Read more >
React: why child component doesn't update when prop changes
Update the child to have the attribute 'key' equal to the name. The component will re-render every time the key changes. Child {...
Read more >
Platform Specific Code - React Native
Certain components may have properties that work on one platform only. ... If those are not specified, native key will be used and...
Read more >
(PDF) Hydrogen isotopic composition of C₃₇ alkenones and the ...
Deviations from this relationship were tentatively interpreted as indicative of export from locations where alkenone producers are/are not subjected to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found