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

Introduction Paragraph
Long form EC for Aluminum
Sparta and _____ went to war for control of the Peloponnesus and trade routes. A. Thebes B. Hellespont C. Athens D. Persia
Re-type the following phrases and correct any errors in capitalization. If there are no errors, type C in the space provided. Example 1. the summer solstice fes
Water is flowing into a large spherical tank at a constant rate. Let V(t) be the volume of water in the tank and H(t) be the height of the water level at time t
a basketball backboard set that sold for $79 is discounted 15%. What is the sales price?
it is ethical for a financial planner to recommend taking advantage of as many tax code regulations as possible to reduce taxes as much as possible?​
How would you describe the relationship of an object’s speed
I just got back from winter break for my school and I already forgot everything INCLUDING the seriously easy things ;)
How many moles of sucrose are dissolved in 250 mL of solution if the solution concentration is 0.150 M?