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

when was the declaration of independence signed?
in response to peer review, a scientific journal might choose not to publish a paper submitted by a scientist. which of the following is a reason why a paper mi
Which term is least appropriate and why ? The light-independent reactions, carbon dioxide fixation, or the dark reactions.
what is blank verse? a. poetry without rhyme or meter b. unrhymed poetry written in iambic pentameter c. poetry with rhyme but no meter d. rhymed poetry written
An etching of a cave bear was found. In the sentence, the phrase of a cave bear is _____. A. an object complement B. an adverb phrase C. a direct object D.
what is meant by backing up files through cloud computing?
why is an environmental contingency plan important
write 6 1/4% as a decimal
why would you use cell names in formulas instead of numbers?
A term used by the media to describe the results of the midterm election in 1994 was