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 formula for Slope-Intercept Form of the Line
What's a Protective tariff?
The point where the two axes intersect (0,0).
Believing that all football players are academically challenged, that all African Americans are great athletes, and that all women can cook well are examples o
need help fast what are all the solution to this problem
question number 4 please help
What are two movies which titles relate to 4th of July?
Which battle produced the bloodiest day of the Civil War?
The first official U.S. flag, adopted in 1777, had what component(s) on it? a. Thirteen stars and thirteen stripes b. Thirteen stripes and the words “Don’t Tr
The last new star was added to the American flag in which year?