Skip to content
Advertisement

How to embed Google Custom Search in React App?

I need to embed a JS widget in a React app. Is there a way to do it?

The JS widget is Google Custom Search:

JavaScript
JavaScript

Advertisement

Answer

use componentDidMount

JavaScript

and use

JavaScript

instead of <gcse:search></gcse:search> according to the documentation

Advertisement