SrBrahma / react-native-gev

MIT License
3 stars 1 forks source link

Text could accept an array of texts #2

Closed SrBrahma closed 2 years ago

SrBrahma commented 2 years ago

Text could accept an array of texts, e.g.:

<Text t={['Header: ', 'Value']}/>

For setting the style for an individual item, we could:

<Text t={[
  {s: s.header, t: 'Header: '},
  {s: s.value, t: 'Value'}
]}/>

, being the style optional.

This would create a parent Text with each array item as a Text child.

SrBrahma commented 2 years ago

What would be the use of data being string[] that a template string couldn't do?

SrBrahma commented 2 years ago

Added in 0.57.0. Array of objects. Found no use to have an array of strings.