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

What is the best estimate for this product? 81*409?
Which organelle does the krebs cycle take place?
If 250 milliliters of Calcium Hydroxide is titrated with 345 milliliters of 0.75 molarity hydrobromic acid, what is the concentration of the base?
A set of water waves travels at 10.0 m/s, and 4.0 waves pass you in 2.0 s. what is the wavelength of the waves?
What are the stages of blood clotting?
have you ever been swimming and noticed some areas in the water are colder and other are warmer? why do you think this happens
A CD usually sells for $18.00. Of the CD is 10% off, and sales tax is 8%, what is the total price of the CD, including tax?
your younger sister cuts her finger with a knife
what is x, 7/8×x equals 1
Which factor plays the biggest role in delaying the detection of childhood diseases? A. Overprotective parenting B. Multiple infections C. Lack of heal