Put in order · Vue.js course · Module 11: Pinia
When to Use Pinia vs provide/inject?
Arrange the criteria for choosing Pinia vs provide/inject
Items to put in order
- Auth state across the entire app - Pinia store
- Theme (dark/light) - provide/inject is sufficient
- Form data in the tree - provide with readonly + actions
- Multi-store with persistence - Pinia with plugins
You can check the correct answer by solving this task in the CodeWorlds game.