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 call a balance in which the rate of change in one direction is equal to the rate of change in another?
Which organization created a shared economy?
Parallel to y=x-3 and passing through (4,5)
How many free states existed in 1850 ?
what help improved farming in the manor
Who was the president of the Confederate States of America? A. Jefferson Davis B. Robert E. Lee C. Abraham Lincoln D. George Washington
Round 4.2354 to the nearest tenth
did panagea occur or is it a myth
A group of friends ordered two pizzas, one with pepperoni and one with mushrooms and green peppers. A plain pizza costs 9 dollars. Each extra topping costs 1 do
what could win in a fight, a lion or a panda?