Recall & Review
beginner
What is a functional component in Vue?
A functional component is a simple Vue component that is stateless and instanceless. It is just a function that returns virtual DOM nodes and does not have its own reactive data or lifecycle hooks.
Click to reveal answer
intermediate
How do you define a functional component in Vue 3?
You define a functional component by creating a function that returns the render output using JSX or the h() function.
Click to reveal answer
beginner
Why might you choose a functional component over a regular component?
Functional components are faster because they do not have reactive state or lifecycle overhead. They are useful for simple UI pieces that only depend on props and do not need internal state or side effects.
Click to reveal answer
beginner
Can functional components in Vue have reactive state or lifecycle hooks?
No, functional components do not have reactive state or lifecycle hooks. They are purely presentational and rely only on props to render their output.
Click to reveal answer
beginner
How do you pass props to a functional component in Vue?
You pass props to a functional component the same way as regular components. The props are received as the first argument in the functional component function.
Click to reveal answer
What is a key characteristic of a Vue functional component?
✗ Incorrect
Functional components are stateless and instanceless, so they do not have reactive state or lifecycle hooks.
How do you define a functional component in Vue 3?
✗ Incorrect
Functional components are defined by exporting a function that returns the render output.
Which of these is NOT true about Vue functional components?
✗ Incorrect
Functional components do not have internal reactive state.
How do you pass props to a functional component in Vue?
✗ Incorrect
Props are passed as the first argument to the functional component function.
Which Vue feature is NOT available in functional components?
✗ Incorrect
Functional components do not have lifecycle hooks.
Explain what a functional component is in Vue and when you might use it.
Think about components that just show data without changing it.
You got /5 concepts.
Describe how to create a functional component in Vue 3.
Focus on the function and what it returns.
You got /4 concepts.