title: export global variable defined in react styles js file
body: <p>I have separated <code>styles.js</code> and <code>app.js</code> for a simple app. And I have image resources defined as global constant variables. (For logos and profiles) I tried to add these constant image resources in <code>styles.js</code> as well. But with my current method and syntax, I can't export these constant image resources from <code>styles.js</code> because they are no defined in styles variable wrapper.</p>
  
  <p><strong>styles.js</strong>:</p>
  
  <pre><code> 'use strict'
  
  import React, { Component } from 'react';
  import {StyleSheet} from 'react-native';
  
  /*
    const background_img= require("../../resource/mybackground.png");
    I tried to define the resource path here
  */
  
  var styles = StyleSheet.create({
     /*Styles Definition*/
  });
  
  export default styles
  </code></pre>
  
  <p><strong>app.js</strong>:</p>
  
  <pre><code>'use strict'
  
  import React, { Component } from 'react';
  import { AppRegistry, Text, TextInput, View, Image,
  TouchableOpacity, Alert} from 'react-native';
  import styles from './styles.js';
  
  /*const background= require("../../resource/mybackground.png");*/
  // I want to move this part to styles.js
  
  
  export class LoginScene extends Component {
  
    constructor(props) {
      super(props);
    }
  
    render() {
      return (
        &lt;Image
           style={[styles.background, styles.container]}
           source={background} //I want to replace to styles.background_img
           resizeMode="cover"
        &gt;&lt;/Image&gt;
        /*Other view definitions*/
      );
    }
  }
  
  export default LoginScene
  </code></pre>
  
  <p>I've indicated where I want to make my change in the above code with comment. If I want to route the source file as what I did above, what should I change in <code>styles.js</code> so that I can export the constant global variables at the same time with styles variable wrapper? </p>