Define a Pinia store using defineStore
Use the
defineStore function from the pinia package to create a store. The function takes two arguments: a unique string ID for the store (used across the application) and an options object. It is a convention to name the exported store constant using the use...Store pattern (e.g., useAlertsStore).import { defineStore } from 'pinia'
// 'alerts' is the unique id of the store
export const useAlertsStore = defineStore('alerts', {
// state, getters, and actions go here
})