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()?
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()?
Not unless you attach it to the window object like so: window.someFn = someFn