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 product in scientific notation? (3.5*10^-5) (3*10^-10
what is the bill of rights
why is it so important for Greeks to honor and represent the gods on their currency
What is the easiest way to find the perimeter of a triangle
Can Two People With Blue Eyes Have A Brown Eyed Child And Why Or How Is This Possible Or Impossible?
If f(3) = 15 and f(5) = 45, which of the following could be f(x)? a. 4x + 3 b. 2x² – 2x c. 2x² - x d. 2x² - 5 e. 5x²
Which statement best describes the properties of a rhombus? A parallelogram with four right angles and all sides equal in length A parallelogram with four ri
Which statement describes an alternate theory of acids and bases? (1) Acids and bases are both H+ acceptors. (2) Acids and bases are both H+ donors. (3) Acids a
Which substance can not be decomposed by a chemical change? (1) AlCl3 (3) HI (2) H2O (4) Cu
When a mixture of water, sand, and salt is filtered, what passes throughthe filter paper?(1) water, only(2) water and sand, only(3) water and salt, only(4) wate