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

115
Views
Pass result of a function from React Js to Javascript

I want to use a text to speech library in React , the library is implemented with pure Javascript and I want to pass a React result which is a text (string) to the functions of this library .

The function with JS :https://codesandbox.io/s/frosty-violet-t494o?file=/src/script.js

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

//inside script.js
const TextToSpeech = (text) => {
  const textEl = document.getElementById("text");
  ...
};
export default TextToSpeech;


//inside you react component
import TextToSpeech from 'script.js';
//execute the function with your text
const text="whatever text";
TextToSpeech(text)
about 4 years ago · Juan Pablo Isaza Report
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!