title: How to integrate WooComerceAPI into React?
body: <p>I wanted to receive data to my site on React through the API.I did everything as stated in the documentation, performed the installation of <code>npm install --save woocommerce-api</code>, created the object with parameters as in the documentation <a href="http://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#pagination" rel="nofollow noreferrer">http://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#pagination</a></p>
  
  <pre><code>import React, { Component } from 'react';
  import '../App.css';
  import WooCommerceAPI from 'woocommerce-api';
  
  
  class Goods extends Component {
      WooCommerce = new WooCommerceAPI({
      url: 'http://portland.com/wp/', // Your store URL
      consumerKey: '**KEY**', // Your consumer key
      consumerSecret: '**KEY**', // Your consumer secret
      wpAPI: true, // Enable the WP REST API integration
      version: 'wc/v2' // WooCommerce WP REST API version
    });
      render() {
          return(
          &lt;div className="GoodsMain"&gt;
              &lt;div className="Goods"&gt;
              &lt;img src="/images/photo.png" alt="appletv"/&gt;&lt;br/&gt;
              &lt;div className="TextAlign"&gt;
              &lt;span className="NameOfGood"&gt;{WooCommerce.get('products/1').name}&lt;/span&gt;&lt;br/&gt;
              &lt;span className="StyleOfGood"&gt;black&lt;/span&gt;&lt;br/&gt;
              &lt;span className="PriceOfGood"&gt;$49.99&lt;/span&gt;
              &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  
          );
      }
  }
  
  export default Goods;
  </code></pre>
  
  <p>But I get <code>Line 20: 'WooCommerce' is not defined no-undef</code><br>
  Can u help me integrate correctly API in my site?</p>