iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

Quiz

Check your grip on Vue 3 reactivity, the Composition API, and component fundamentals.

Sample questions

EXAMPLE
# Vue 3 quiz

1) ref() vs reactive(): which wraps primitives?
   a) reactive()  b) ref()  c) both  d) neither

2) Inside <script setup>, where do you put cleanup logic for a watcher?
   a) onUnmounted  b) the watcher returns a stop fn
   c) onBeforeMount  d) provide/inject

3) defineProps with TypeScript: which is preferred in Vue 3.3+?
   a) runtime declaration
   b) generic type-only declaration
   c) PropType<T>
   d) defineProps as any

4) v-model on a custom component implicitly binds:
   a) value/input
   b) modelValue/update:modelValue
   c) checked/change
   d) data/onData

5) computed() returns:
   a) plain value
   b) Ref-like object (.value)
   c) Promise
   d) signal

6) Which directive is for one-time interpolation?
   a) v-once  b) v-pre  c) v-memo  d) v-cloak

7) Teleport renders content:
   a) at component root
   b) into another DOM node by selector
   c) into the head only
   d) only on SSR

8) Pinia replaces:
   a) Vue Router  b) Vuex
   c) component props  d) the template compiler

Answers: 1b, 2b, 3b, 4b, 5b, 6a, 7b, 8b.

Why it matters

Where you score lowest, that is your study area. Reactivity and v-model contracts trip up most teams migrating from Vue 2.

Tip: Tweak the snippet with Try it Yourself », then sit the quiz at the bottom of the page.

Example

Example
// 3 questions per lesson.
Try it Yourself »

Discussion

Loading…