.Render React on the Server with renderToString

Tell us what’s happening:

Hi everybody,How are you?I am good.Can you tell me what is wrong with with this exercise and why is
wrong that code that i write?I am trying to find the wrong but I can’t.

Your code so far


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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/render-react-on-the-server-with-rendertostring

1 Like

When you are rendering a component. You need to have html like syntax like this.

<nameOfYourComponent />

1 Like

Ohhh I can’t find i try some codes but again is wrong.What can I do else to find it or can you tell me some more easy explain :slightly_smiling_face:

1 Like

OK so I will try to find my wrong and I tell you.

class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return


}
};

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

This is my new code and is right thank you for helping.

Thanks!, you’re right, the argument is not a string, and we have done similar challenge. so this like a reminder