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

How do you know what power to raise both sides of an equation to if the indexes of the radicals are different?
WHICH STAGE DOES SEGREGATION OF GENE PAIRS TAKE PLACE
Why did the Europeans use one crop economies in their colonies?
How do you spell 3:10 in Spanish?
Find the missing lengths in right triangle mno. Estimate your answer your answer to two decimal places..
Which of these is a problem that globalization poses for the U.S. government? A. Loss of tariff revenues B. Increased security concerns C. Opposition to its hum
A sanitation supervisor is interested in testing to see if the mean amount of garbage per bin is different from 50. In a random sample of 36 bins, the sample me
31. A big 8 kg fish swimming at 3 m/s opens its mouth and swallows a small 2 kg fish swimming away from it at 1 m/s. Presume water resistance is negligible. Sho
In each of the following pairs, determine the temperature change, and whether the temperature increased or decreased. a. 45° F to –10° F b. 35° C to 80° F c.
The black figure is an ellipse, and the black line segment is is major axis. What is the length of the blue line segment?