Vue.js Intermediate Quiz
Explore Composition API, lifecycle hooks, computed properties, and component communication
Start the quizSample questions from this quiz
A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.
1. What is the Composition API?
- API composition
- Alternative API for composing component logic with functions
- Component composition
- Music composition
Show answer
Answer: Alternative API for composing component logic with functions. Composition API uses composition functions (composables) instead of options. Better TypeScript support, more flexible code reuse. Vue 3 feature.
2. What is the setup() function?
- Constructor
- Entry point for Composition API
- Setup configuration
- Initialization function
Show answer
Answer: Entry point for Composition API. setup() is the Composition API entry point. Runs before component is created. Returns values exposed to template. Runs only once.
3. What does ref() do in Vue 3?
- Imports references
- Creates references
- References DOM elements
- Creates a reactive reference to a value
Show answer
Answer: Creates a reactive reference to a value. ref() wraps a value in a reactive object. Access/modify via .value in script. Auto-unwrapped in templates. Use for primitives.
Frequently asked questions
How many questions are in this Vue.js quiz?+
30 questions, with a 60-minute time limit. Every question includes a written explanation of the correct answer.
Is this Vue.js quiz free?+
Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.
What level is the intermediate quiz aimed at?+
Explore Composition API, lifecycle hooks, computed properties, and component communication
Can I use this to prepare for a Vue.js interview?+
Yes. The questions cover the topics that come up in Vue.js technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.
Ready to test your Vue.js?
30 questions, 60 minutes. Free, no sign-up.
Start now