I have this file Foo.js:
const Foo= ({ someArg }) => {
alert(someArg);
};
export default Foo;
I am calling it from App.js:
function App() {
useEffect(() => {
Foo("text");
}, []);
...
The function gets called, but the alert shows undefined instead of the actual value that was passed. How do I properly pass arguments to a function in another file?