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 clause that cannot stand on its own as a sentence is known as a(n) A. dependent clause. B. adverbial clause. C. prepositional clause. D. modifying clause.
93 is decreased to 90
A water fountain dispenses 8 cups of water per minute. Find this rate in pints per minute.
Without the oceans, Earth's climate would be which of the following? A. less extreme B. more extreme C. just about the same
suppose that your friend is moving far away and describing his new location. He mentioned that Derreck gets a lot of precipitation for most of the year, except
the christians in Jerusalem in the catacombs for their worship services true? or false?
When would there be only four different equations for a set of math mountain numbers?
Kennedys political agenda was known as the new deal true or false
When new clay sediment is deposited on top of old beach material, it's known as A. regression. B. progression. C. aggression. D. transgression.
Which side does these following words go ? : orange, dragon, engine,digit ?