[Solved] How to add function in JSX?

1) You’re missing a closing bracket on the ReactDOM line: ReactDOM.render(<Main />, document.getElementById(‘root’)); 2) You need to call the function for it to work vanilla_JS() In this working example instead of logging to the console I’m returning a string: function Main() { const vanilla_JS = function() { return ‘testing’; } return ( <main> <div>{vanilla_JS()}</div> </main> … Read more