0
function App() {
 
 const someFn = () => { 
   console.log('hey!') 
  }

 
return <div>...</div> 

}

So once the website has loaded and the component has been mounted, is it possible to somehow access the javascript and invoke someFn()?

1 Answers1

0

Not unless you attach it to the window object like so: window.someFn = someFn

Neil Girardi
  • 4,533
  • 1
  • 28
  • 45