Web Development React.js Objective
Sep 28, 2025

What is the correct way to create a React component?

Choose the correct answer:
A) function MyComponent() { return <div>Hello</div>; }
B) const MyComponent = () => { return <div>Hello</div>; }
C) class MyComponent extends React.Component { render() { return <div>Hello</div>; } }
D) All of the above
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback