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

a rectangular table top measures 4/9 of a meter long by 4/5 of a meter wide. the area is _____ square meter.
Find the next two terms in the following sequence. 13, -5, -35, -77,...
Solve the equation: 1/4 + w = 6 1/3
What Is Geographic Mobility?
how do you solve the equation 2s+3=14s
what are facts on Loyalists?
factoring-16w²+50wz-21z²  please help me solve
How do you use equal protection of law in a sentence
Why does more solar energy reach the equatorial regions than the polar regions?
Why was FDR's Court Packing Plan a mistake?