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

understanding ryans requirements, the light designer plans to implement the _
Prove all the relation of quadric polynomial. Kindly need help!!! ​
Solve 2x+4<6 I have no clue
2 C4H10 + 13 O2--> 8 CO2 + 10 H2O How many molecules of CO2 are produced from the combustion of 100 grams of butane (C4H10)?
A line intersects the points (12, -2) and (6, -8). What is the slope of the line in simplest form? m = [?]
what is the least measurement of black hole, ​
Why are editorial cartoons an effective way for someone to show their opinion?
What are the basic units of matter? electrons atoms protons neutrons
List all of the ions present in solution when the following strong electrolyte compound is dissolved in water Co3(PO4)2
Tori invests $1,500 into the stock market which earns 9% per year. In 20 years, how much will Tori's investment be worth if interest is compounded semiannually