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 do you think President Jackson's opinion of Native Americans is based on the tone and vocabulary of this speech?
Need help on this questionnn
What times 4 minus 2 divided by 30 equals 68
The perimeter of FIHG is 24 cm. What is the measure of FI?
Which shows the image of rectangle ABCD after the rotation (x, y) → (–y, x)? On a coordinate plane, 2 rectangles are shown. The first rectangle has points A (n
PART A: Which statement expresses the main idea of the story?of The War Of The Wall​
The sum of the first 6 terms of a geometric series is 15, 624 and the common ratio is 5 What is the first term of the series?
2(x + y)² – 9(x + y) – 5How do I factorise using identity ​
What is the direct object in the sentence I help my sister with her Spanish homework.
what’s the answer when x=3 and y=5 ?