I need to use script tag for a third party widget(estas widget for rating). Below is the code which i need to add as a script ->
<script>
(function (w,d,s,o,f,js,fjs) {
w['ESTAS-Widget']=o;w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'estas', 'https://www.theestas.com/assets/js/min/widget.bundle.js'));
estas('init', { el: 'estas-widget', key: 'abcbabababababa', showComments: true, showPhil: true, minimumRating: 1, name: 'name' });
</script>
And then add this widget div inside the jsx where i need to display. like ->
<div id="estas-widget"></div>
Not able to find any solution, I am using functional component(can switch to class component if required)