React-native-windows: Text backgroundColor not working!!!

Created on 27 Aug 2018  路  2Comments  路  Source: microsoft/react-native-windows

Environment

  1. react-native -v: react-native-cli: 2.0.1 / react-native: 0.54.0
  2. npm ls rnpm-plugin-windows: [email protected]
  3. npm ls react-native-windows: [email protected]
  4. node -v: 9.9.0
  5. npm -v:5.6.0
  • Target Platform: WPF
  • Target Platform Version(s): .NET 4.6.1
  • Target Device(s): Desktop
  • Development Operating System: Windows
  • Visual Studio Version: Visual Studio 2017
  • Build Configuration: Debug

export default class App extends Component<{}> { render() { return ( <View style={styles.container}> <Text style={{backgroundColor: 'red'}}> Hello </Text> </View> ); } }

Most helpful comment

Try to put the Text in a View and set the background color of the View.

All 2 comments

Try to put the Text in a View and set the background color of the View.

Text background color is not currently supported on UWP - see #698 for details. Closing as dupe.

Was this page helpful?
0 / 5 - 0 ratings