I followed both the documentation, and the solution found here, on SO. But the input field just wouldn't load on localhost. It does however if I just add it into an index.html file.
<script async src="https://cse.google.com/cse.js?cx=123456">
</script>
<div class="gcse-search"></div>
Does anybody know what might cause it?
Things I tried:
- Added it to my page as displayed above.
- Added the
script
tag separately into thehead
tag. - Added the script as a function into the
ComponentDidMount