title: How to define constants in ReactJS
body: <p>I have a function that maps text to letters:</p>
  
  <pre><code>sizeToLetterMap: function() { 
       return {
                  small_square: 's',
                  large_square: 'q',
                  thumbnail: 't',
                  small_240: 'm',
                  small_320: 'n',
                  medium_640: 'z',
                  medium_800: 'c',
                  large_1024: 'b',
                  large_1600: 'h',
                  large_2048: 'k',
                  original: 'o'
              };
  }
  </code></pre>
  
  <p>these letters are used to create flickr photo urls. So, the photoUrl function takes in a image object and size text object and calls the sizeToLetterMap to come up with the letter for that size text.</p>
  
  <p>The function:</p>
  
  <pre><code>photoUrl(image, size_text): function () {
        var size = this.sizeToLetterMap(size_text);
  }
  </code></pre>
  
  <p>I don't think its proper design to have the sizeToLetterMap as a function. I think it fits better as a constant. How can I define constants in ReactJS?</p>