liltrell2568 liltrell2568
  • 02-12-2021
  • Computers and Technology
contestada

How to use a state value in stylesheet in react native.

Respuesta :

bushiaslam32008 bushiaslam32008
  • 05-12-2021

Answer:

Change this code:

return <View style={[styles.container, backgroundColor: this.state.bg]}/>

for this code:

return <View style={[styles.container, {backgroundColor: this.state.bg}]}/>

Answer Link

Otras preguntas

Sugar is obtained from which plant
What ethical concerns do you have about the sharing of health data online?.
Why is American Muslims stereotyped after 9/11
]The Hipster Dance company purchases 5 bus tickets that cost $150 each, and they have 7 bags that cost dollars each. If the total bill is $823.50, how much does
During the time interval from 0.0 to 10.0 s, the position vector of a car on a road is given by x(t) = a + bt + ct2, with a = 17.2 m, b = -10.1 m/s, and c = 1.1
Water and ammonia molecules are roughly the same size and the same mass but ammonia boils at -28F (-33C) and water boils at 212F (100C). What can we conclude ab
how do bacteria cause disease?
Sugar is obtained from which plant
Find the volume. Area = 16.4 cm² 8.1 cm cm³
Why would the Central Powers agree to the Treaty of Brest-Litovsk? 1. Russia offered reparations 2. A major enemy was withdrawing from the war 3. they could foc