Render React on the Server with renderToString-what is wrong with my pen?

Tell us what’s happening:
Passed in freecodecamp challenge but not getting the same output on my codepen. Wonder what I am missing behind the hoods in codepen? Thanks for suggestions. My codepen link for this pen is: []

Your code so far

class App extends React.Component {
  constructor(props) {
  render() {
    return <div/>

// change code below this line
ReactDOMServer.renderToString(<App />);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:

Hello meeramenon07,

Could you specify the exact task you want to accomplish?

If you need to render your React application in the browser, you have to use different client-side renderer: ReactDOM.render(<App />, document.getElementById('root'));

I have already managed to do the task on freecodecamp challenge but unable to get the result in my codepen by doing the same code, thats what I meant.