title: React Uncaught ReferenceError: variable is not defined
body: <p>I use one component 2 times. When it call first time evering is good but when I call second time (move to different component through the react router) I have exception <code>Uncaught ReferenceError: titleStyle is not defined</code>. In console I see the problem in this line: <code>_react2.default.createElement("h2", { style: titleStyle },this.props.title,":")</code>
  What I did wrong? </p>
  
  <p><strong>TitleWithAddButton.jsx</strong> (the component with problem)</p>
  
  <pre><code>import React from 'react';
  import {Link} from 'react-router'
  
  export default class TitleWithAddButton extends React.Component{
   render(){
      let titleStyle = {
          width:"50%"
      };
  
       var button = {
           width: "10%",
           float: "right"
       };
  
      return (
          &lt;div className="title-with-add-button"&gt;
              &lt;div&gt;
                  &lt;Link to="/carwashAdd"&gt;&lt;button type="button" className="btn btn-success" style={button}&gt;Add&lt;/button&gt;&lt;/Link&gt;
              &lt;/div&gt;
              &lt;h2 style={titleStyle}&gt;{this.props.title}:&lt;/h2&gt;
          &lt;/div&gt;
      )
  }
  }
  </code></pre>
  
  <p><strong>CarWashPage.jsx</strong> (the first time componen is call from it)</p>
  
  <pre><code>import React from 'react';
  import TitleWithAddButton from './TitleWithAddButton.jsx';
  import AllCarWashTable from './carwash/AllCarWashTable.jsx'
  
  export default class CarWashPage extends React.Component{
  
  render(){
      var carWashPageStyle = {
          paddingLeft: 10,
          paddingRight: 10
      }
  
      return (
         &lt;div style={carWashPageStyle}&gt; 
              &lt;TitleWithAddButton title="All carwash"/&gt;
              &lt;AllCarWashTable/&gt;
         &lt;/div&gt;    
      )
  }
  }
  </code></pre>
  
  <p><strong>AddCarWashPage.jsx</strong> (second time component is call from here)</p>
  
  <pre><code>import React from 'react';
  import Title from './../Title.jsx'
  
  export default class AddCarWashPage extends React.Component{
  
  render(){
      var addCarWashPage = {
          paddingLeft: 10,
          paddingRight: 10
      }
  
      return (
          &lt;div style={addCarWashPage}&gt;
              &lt;Title title="Add CarWash"/&gt;
          &lt;/div&gt;
      )
  }
  }
  </code></pre>