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

If you grow 738 pumpkins and sell 481, how many do you have left? A. 481 B. 1,209 C. 690 D. 257
People who regularly use implied meanings are _____. friends and politicians advertisers and journalists both of the above neither of the above
Which type of law governs the relationship between private individuals or companies?
The _____ Party advocated for labor reform.
how does moving the place of a digit change its value
What is the term used for a play that is performed exactly as it is written? adapted direct translation indirect translation
What conflict drives the action forward in Romeo and Juliet? A. an ongoing argument between Mercutio and Romeo about women B. an ancient feud between the Montag
The _____ Party advocated for labor reform.
Which two words below are using the hyphen correctly? A. Ex-husband B. Pre-school C. Self-evident D. Re-tell
In Western Europe, the effects of the Crusades included all of the following except A. encouragement for learning and a broader view of the world. B. a w