I am all new to React Native, and trying to understand how to make one pressable JSX element active (Active means the text colour change/Icon colour change) when the user clicks it (Any of the three Pressables)
Example: Consider I have three pressables as below
<Pressable>
<Text><Icon name="flame" size={13} color={GRAY} /> 123</Text>
</Pressable>
<Pressable>
<Text><Icon name="flame" size={13} color={GRAY} /> 456</Text>
</Pressable>
<Pressable>
<Text><Icon name="flame" size={13} color={GRAY} /> 789</Text>
</Pressable>
Now I am looking for a solution that can change the user clicked pressable's ICON colour change to RED, using the best possible way.
Note: I am going to render something based on these button clicks, so looking for a best possible dynamic solution.
Thank you.