React

ReactJS Practical Questions - react code snippet e...

4.

In the following React code snippet, what line is missing to properly render the component?

import React from 'react';

class MyComponent extends React.Component {
  render() {
    return (
      <div>
        <h1>Hello, World!</h1>
        // Missing line
      </div>
    );
  }
}

<img src="image.jpg" alt="My Image">

<button>Click Me<button/>

<MyCustomComponent >

<p>This is my component.</p>