π’ Itβs coming! Certificates.Devβs Vue.js Free Weekend is Aug 23β24!
π FREE 48h Official Vue.js Mid-Level Cert Training: Pinia challenges, trial exam & more.
Letβs upgrade your skills: https://certificates.dev/vuejs/free-weekend
@masteringpinia.com.bsky.social
πTransform your Vue.js state management skills with Mastering Pinia πΒ Developed by the author of Pinia πΒ From BitterBrains, powered by @vueschool.io
π’ Itβs coming! Certificates.Devβs Vue.js Free Weekend is Aug 23β24!
π FREE 48h Official Vue.js Mid-Level Cert Training: Pinia challenges, trial exam & more.
Letβs upgrade your skills: https://certificates.dev/vuejs/free-weekend
Are you using Pinia Coladaβs useQuery or useMutation in your projects?
How do they compare to TanStack Query? π€
π‘ Tip: Simplify Pinia Store Creation
Hereβs a quick counter store example:
Use it in your Vue component with `const counter = useCounterStore()`
Whatβs your favorite Pinia Colada feature for simplifying data fetching in Vue?
Letβs hear your use cases! π©βπ»
What would you do if someone opened an issue or discussion like this in your OSS repo? π
14.08.2025 06:52 β π 11 π 1 π¬ 5 π 0π π
14.08.2025 07:51 β π 0 π 0 π¬ 0 π 0Unit Testing Stores: What do you know about it?
Check out this lesson where we will cover everything there is to know about unit testing stores with Pinia. π
https://masteringpinia.com/lessons/unit-testing-stores
How do you organize your Pinia stores in large Vue 3 apps to keep them maintainable?
Share your folder structure! πͺ
π₯ Today we have a special announcement for you: Certificates.Devβs Vue.js Free Weekend is Aug 23β24!
Get 48h FREE Official Vue.js Mid-Level Cert Training with Pinia focus, code challenges & trial exam.
Are you ready? Sign up now: https://certificates.dev/vuejs/free-weekend
π‘Tip of the day: Pinia integrates with Vue Devtools for inspecting and debugging your stores.
Vue Devtools provides a dedicated tab for viewing and manipulating Pinia store state, making it easier to debug your application's state management.
π€A community member asked us: "How does the βn refβ keep its value once it is destroyed?β
π€ Hereβs our answer:
The βn: refβ syntax is used to create a reference that persists across component re-renders, the value stays untouched, just the reactivity stops working.
Create a basic Vue 3 `effectScope` π©βπ»
Vue offers effectScope as a container for reactive effects. You can create one using effectScope() and run effects within it using scope.run().
Interested in learning how to test stores and components that consume stores? π¬
Weβve got your back, check this out:
https://masteringpinia.com/lessons/introduction-to-testing-stores
Stop an `effectScope` to clean up effects βοΈ
To prevent memory leaks, you can stop an effectScope using scope.stop(). This will clean up all effects within the scope.
Nest effectScopes for hierarchical management π
You can create nested `effectScopes` to organize your effects. This helps in managing complex reactive logic.
By detaching the effectScope, the store's state and functions become accessible globally, independent of component lifecycles.
30.07.2025 14:29 β π 0 π 0 π¬ 0 π 0π‘Tip of the day: Detach `effectScope` for Global Store Management
To create a global store that transcends component lifecycles, use effectScope(true) to detach the scope. Beware this needs extra handling for SSR Apps β οΈβ¬οΈ
A community member asked us: "How can I create separate Pinia store instances for multiple embedded Vue apps on a single CMS page?"
Here's our answer: Each app does app.use(createPinia()). π
Singleton Store: One Store to Rule Them All π
Ever accidentally create multiple copies of your store, leading to chaos? A WeakMap in defineStore guarantees there's only one instance per function. This keeps your state management predictable and efficient.
Separation of Concerns: Store Logic, Meet Usage! π«
Think of your store as a well-organized kitchen. The ingredients (logic) are prepped separately, making it easier to assemble delicious components (store usage). This separation promotes reusability, testability & cleaner code.
Confused about Setup vs. Option Stores in Pinia?
Our Pinia lesson clears it up! Discover a more flexible syntax for writing #Pinia stores, unlocking greater functionality for your Vue apps.
β‘ https://masteringpinia.com/lessons/what-are-setup-stores-and-how-do-they-compare-to-option-stores
Use Reactive Refs for Dynamic State π
Create reactive state properties using ref to ensure components automatically update when changes occur, maintaining a dynamic and responsive user interface.
@nuxt.com x @supabase.com module is now compatible with Nuxt 4 β
π github.com/nuxt-modules...
vue-router build powered by tsdown + rolldown β¨
18.07.2025 16:40 β π 39 π 4 π¬ 2 π 0Vue.js Free Weekend - Aug 23 & 24
48hrs of FREE access to @vuejs.org cert training, designed to prep you for the official exam reviewed by @evanyou.me
π» Code challenges
π§ 10 MCQs + 1 code task (trial exam)
π Covers Composition API, Pinia,Vue Router & more
Sign upπ
certificates.dev/vuejs/free-w...
Controlled Updates with Actions: Keep Your State Organized π
Actions are like measured cooking instructions for modifying your store's state. They provide a controlled and predictable way to update the state, ensuring consistency and easier testing.
π₯Tip of the day:
Getters let you create computed properties based on your store's state. They're cached and only recomputed when the underlying state changes, improving performance.
Confused about useStore()? π
We have a FREE lesson that explains the composable function returned by defineStore(), detailing where it can be called and how to use the store outside of components.
Watch now it here: https://masteringpinia.com/lessons/how-does-usestore-work
Struggling with state management in your Vue.js apps? π
The "Quick Start with Pinia" lesson on Pinia breaks down this powerful library, showing you how to efficiently manage data across components.
Best part? It's free! Check it out:
https://masteringpinia.com/lessons/quick-start-with-pinia
π₯Tip of the day:
The $subscribe method lets you register a callback that will be executed whenever the store's state changes. This is useful for persisting data, logging changes, or triggering other side effects.