Created
January 19, 2021 18:11
-
-
Save AllanGraves/5023a514134b775dc951580ab9433193 to your computer and use it in GitHub Desktop.
Displaying our individual components from regexifyString in a ordered text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textToDisplayArray = ParserClass.parseVariables(text); | |
let textList = textToDisplayArray.map((item) => { | |
if (typeof item !== 'string') { | |
return item; | |
} else { | |
return <Text>{item}</Text>; | |
} | |
}); | |
return <View style={{flexDirection: 'row'}}>{textList}</View>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment