Skip to content

Instantly share code, notes, and snippets.

@AllanGraves
Created January 19, 2021 18:11
Show Gist options
  • Save AllanGraves/5023a514134b775dc951580ab9433193 to your computer and use it in GitHub Desktop.
Save AllanGraves/5023a514134b775dc951580ab9433193 to your computer and use it in GitHub Desktop.
Displaying our individual components from regexifyString in a ordered text.
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