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

Franco is solving a system of linear equations algebraically. He find that there are an infinite number of solutions. Which is a possible step in his solution?
HELPPP PLEASEEEEEEE ASSAAPPPP
What type of triangle is triangle ABC? Give your reasons for your answer:
Explain what the Three-Fifths Compromise was and why it was created by delegates at the Constitutional Convention.
If you have 3.5 L of He to blow up balloons... at STP... a) How many moles of He do you have? b) How many grams of He do you have?
The following trial balance of Watteau Co. does not balance. Debit    Credi
9(-10y+10)+4y SIMPLIFY
enun en un cuadro comparativo define lo qie es y no de ladivision de trabajo​
38 is what percent of 84 (to the nearest percent)?
No questions just need a friend!