Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
How to add script tag with function call inside jsx in react js

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)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!