React

ReactJS Practical Questions - react code render fi...

8.

What is the problem with the given code and how do you fix it?

const Component = () => {
  <h1>Hello world!</h1>;
};

The component is not being exported properly.

The JSX element is missing a return statement.

Change the curly braces to parentheses

Surround the h1 in a div.