12:30
🌐 EN
NB
Modern JavaScript & Vue 3

Vue 3 Fundamentals — Quiz 2

Question 4 of 10
3 answered · 1 flagged · 6 remaining
Q4 Single choice · 1 pt

In Vue 3 with Pinia, what is the correct way to access a store's state in a component using the Composition API?

this.$store.state.counter
Import the store and call it as a composable: const store = useCounterStore()
Use storeToRefs(store) and destructure reactive state
Both B and C are correct approaches
Q5 Multiple choice · 2 pts — complete Q4 first

Which of the following are valid Pinia store action patterns? (Select all that apply)

Async actions using async/await
Direct state mutation inside actions
Calling other store actions from within an action
Using commit() to trigger mutations
Ready to submit?
3 of 10 answered. Review flagged questions before submitting.

Question palette


Current question
Answered
Flagged for review
Not visited
Quiz info
Questions10
Total points15 pts
Pass threshold70%
Attempts allowed2
This attempt1st