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 did the geographic features and indigenous population of early Virginia influence the growth of the colony at Jamestown?
A box is 20 cm long. Which of these is closest to the length of this box in feet? (1 inch = 2.54 cm) 0.66 foot 0.75 foot 1.66 feet 7.87 feet
Where is tenessine on the periodic table?
Hmm..... Can someone help me please ? Thanks!
Identify three structures which provide support and protection in a eukaryotic cell.
Becky and tommy are asked to solve -4x-25=8x+15 identity where one of them made an error
Who wrote composed the music for tombstone 1993?
Write the equation of the line in slope intercept form with a y intercept of negative 4 and a slope of 9 over 7
A human's most rapid growth, both physically and mentally, occurs between a0 and a1 years old.
elizabeth brought a box of doughnuts to share. there are two-dozen (24) doughnuts in the box, all identical in size, shape and color. five are jelly-filled, 5 a