A

Admin • 833K Points
Coach

Q. Which of these is NOT a valid way to create a React component?

  • (A) function MyComponent() { return <div />; }
  • (B) class MyComponent extends React.Component {}
  • (C) const MyComponent = () => <div />;
  • (D) createComponent(() => <div />);
  • Correct Answer - Option(D)
  • Views: 19
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

createComponent is not a React API.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.