title: React JS Error: is not defined no-undef
body: <p>I am a beginner developer at redux </p>
  
  <p>my actions/cart.js </p>
  
  <pre><code>export default addToCart = (item) =&gt; {
      console.log("item: " + item);
      return {
          type: 'ADD'.
          item
      };
  
  }
  </code></pre>
  
  <p>and reducers/cart.js </p>
  
  <pre><code>export default (state = [], payload) =&gt; {
      switch (payload.type) {
          case 'ADD':
              return [...state, payload.item];
          default:
              return state
      }
  }
  </code></pre>
  
  <p>linter says:</p>
  
  <pre><code>./src/actions/cart.js
  
    Line 1:  'addToCart' is not defined  no-undef
  </code></pre>
  
  <p>How can I solve this problem?</p>