avatar not showing fallback icon when source prop becomes undefined/null
See original GitHub issueExplain what you did I’m using an Avatar component with an image source and an icon as a fallback for a profile picture. If the image source is initially set to be undefined (i.e. no profile photo), the Avatar renders correctly with the icon, and if it has a source image, that renders correctly too.
Expected behaviour I would expect the Avatar to render the icon when the source prop is removed and the component rerenders.
Describe the bug
If there is initially an image, and then it’s removed (use case here is a profile photo, and the user removing the profile picture), when the source prop becomes undefined, the avatar doesn’t render the icon, just a background with no icon and no image (tried using renderPlaceholderContent and it doesn’t render that either in this case).
Issue Analytics
- State:
- Created 4 years ago
- Comments:14

Top Related StackOverflow Question
According to doc, the following code should render placeholder with title
MD:However, it doesn’t show anything.
If you give some random string to
source.uri, then it will render placeholder:I’ve tested in iOS and
react-native-elementsversion is 2.0.1The issue is not fixed for android.