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

Underlying alzheimer's disease is a deterioration in neurons that produce:
During the civil war, what region had the advantage of having many army officers with training and experience obtained at the famed west point?
How did Dr. Martin Luther King, Jr. and Malcom X differ in their approaches to gaining civil rights? A. Dr. King agreed with the use of violence; Malcom X d
Cindy conducted an experiment for her science class. She repeated the experiment three times. Each time, Cindy got a different result. What should a Cindy do ne
What do the european union (eu) and the world trade organization (wto) have in common?
What is the current in a 48 kω resistor with 150 v across it?
which of the following was a cause of war between the greek
Describe how living things can affect the different characteristics and development of soil.
Calculate the earth's gravity force on a 75 kg astronaut who is repairing the hubble space telescope 600 km above the earth's surface express your answer using
What are the two basic functional units of the nervous system?