Example-ComponentA imports App.js and attempts to assign App.functionA to functionB and then call it in the JSX. This results in a failure basically saying that the function is not defined.
import React from ‘/react;
import ReactDOM from ‘/react-dom;
import App from ‘./App.js;
ReactDOM.render(<App />, document.getElementById(‘root));
import React from ‘/react;
class App extends React.Component {
constructor(props) {
super(props);
this.state = {someProp = ‘};
};
functionA = (e) => console.log(e);