An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
March 26, 2022 01:20 am GMT
Original Link: https://dev.to/anatugreen/how-to-change-color-of-an-icon-text-or-other-component-with-reactnative-usestate-hook-1cfi
How to change color of an icon, text or other component with ReactNative useState Hook
Here is an example that can be helpful. In this case, I want to update the colour of my heart IonIcon when a user clicks on it once, so I first wrapped it in touchableOpacity to get that blink effect. If you don't want to wrap it, you simply put
Original Link: https://dev.to/anatugreen/how-to-change-color-of-an-icon-text-or-other-component-with-reactnative-usestate-hook-1cfi
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To