Web Development React.js Objective
Aug 16, 2025

What is the correct syntax for a functional component?

Choose the correct answer:
A) function MyComponent() { return <div>Hello</div>; }
B) class MyComponent() { return <div>Hello</div>; }
C) component MyComponent() { return <div>Hello</div>; }
D) function MyComponent() { display <div>Hello</div>; }
Discussion (0)

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

Share Your Thoughts
Feedback