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

while ice skating,alice slipped and injured her knee.what is one way Alice might have prevented this injury
What's the difference between Romanesque and Gothic style buildings?
1.How would you describe a person that wants to help his family ? 2. How would you describe a person that is hopeful?
please help Evaluate the expression when r = 8.2 and s = –3.7. r – 2s A. –22.94 B. 0.8 C. 4.5 D. 15.6
which channel is the most popular one for the evening news A. WANR B. WWCN C. WCLM D. WKOD
the form of city government merges executive and legislative functions in single group of officials
What changes were made in Utah during World War 1?
outlaws of the Wild West were heroes of their time
what are three major water problems in southwest asia?please help!
what produces the motion of air convection