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's the other term for: one who overindulges in food and drink
Jim has gotten scores of 99 and 93 on his first two tests. what score must he get on his third test to keep an average of 90 or greater
name a metal that doesn't conduct electricity
How would you call in other words to scold or punish severely
Which expression is equivalent to 27/125
A tree casts a shadow 27 m long. At the same time, the shadow cast by a 66-cm tall statue is 56 cm long. Find the height of the tree to the nearest tenth of a
Which of the following steps is not critical in the creation of Bt corn?a.Cut out a piece of DNA from a DNA molecule.b.Splice a piece of DNA into DNA from anoth
What's the other word stubborn; inflexible
How many moles of water (H2O) would be produced if 10 moles of O2 gas reacted completely with excess H2 gas?2 H2(g) + O2(g) → 2 H2O(g)A. 5 B. 10 C. 20 D. 30
How do we use the Pythagoras theorem in "everyday life".