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

¿La extrema derecha del espectro político está asociada con qué filosofía política extrema? Utopismo Comunismo Totalitarismo Socialismo
What do you want to achieve during high school? What are your main goals and your hopes?
Kegiatan pertanian komersial penting untuk menjana pendapatan negara. Bincangkan​
The child has been diagnosed with severe iron deficiency anemia. The child requires 5 mg/kg of elemental iron per day in three equally divided doses. The child
Which statement is true regarding the graphed functions f(4)=g(4) F(4)=g(2) F(2)=g(-2) F(-2)=g(-2)
Give reasons:Health education is based on variety of subject.a.​
Which of these is an inference about black-and-white ruffed lemurs? (1 point) O Lemur populations will continue to decline if they are not protected. O Madagasc
tư tưởng hồ chí minh
Jennifer is saving money to buy a bike. The bike costs $239. She has $127 saved, and each week she adds $16 to her savings. How long will it take her to save en
Two professional gamers subscribe to twitch streamers. Jonah has 430$ saved up, and spends 45$ a month on subscriptions. Rodrick has 310$ saved up, and spends 2