reactjs - How to have linear gradient background on all screens in React Native -


i have app written in react native. have gradient background in screens. maybe like:

enter image description here

i have found react-native-linear-gradient package, higher performance using image?

also, how make sure stays background on pages?

would like

const container = (props) => (   <view>     <lineargradient colors=['blue', 'orange', 'blue'] />     {props.children}   </view> ); 

and on screens use

<container>   .. </container> 

you can try create gradient image in graphical editors allow set linear gradient top(blue) bottom(transparent), , place image background scenes. can helpful. if need cange colors of gradient dynamically, need use libraries now.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -