Help how to Render React on the Server with renderToString

Please how to render a react component on server with renderToString()??

This is what I’ve written - what is wrong?



class App extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return <div/>
  }
};
// change code below this line
ReactDOMServer.renderToString(App);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0.

Link to the challenge:

2 Likes

Hi,
I think you forgot to place App inside of “(< />)”

1 Like

Thanks @KoniKodes i did it.

Glad it worked :blush: