title: How to include google custom search box in an React component
body: <p>I would like to add a google custom search box in my site, which is created by using ReactJS. So the user can search content both within the site and on web.</p>
  
  <p>The Google generated code is something like:</p>
  
  <pre><code>&lt;script&gt;
    (function() {
      var cx = '013626029679071:ze3ta4';
      var gcse = document.createElement('script');
      gcse.type = 'text/javascript';
      gcse.async = true;
      gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(gcse, s);
    })();
  &lt;/script&gt;
  &lt;gcse:search&gt;&lt;/gcse:search&gt;
  </code></pre>
  
  <p>Is there a way to add this into the React component? It keeps saying SyntaxError. I tried to create a component for the above code and use it in the React Component, but nothings shows up. Is this the right way to add a searchbar on React site? Any hints?</p>
  
  <p>Thanks!</p>