Emojis are being displayed with a tag at the end in a Text Component, how to remove "undefined"?

Viewed 35

so I have a slider with a bunch of different emojis the user can select. But when they select one it gets displayed as "undefined".

When I display it in the console that doesn't get added only on the app it shows. How do I go about to remove the undefined part?

Screenshot: [1]: https://i.stack.imgur.com/RlMQR.jpg

Code:
const [selectedEmoji, setSelectedEmoji] = useState([""]);

<Text style={{ color: "white", fontFamily: "Futura", padding: 20 }}>  
     `{isToggled ? selectedEmoji + "Emoji ▲" : selectedEmoji + "Emoji ▼"}   
</Text>  
</TouchableOpacity>

Let me know if you need more code or have any ideas to the cause of this issue

0 Answers
Related