Open
Description
Clear and concise description of the problem
Hello. I'd like to have functional key
option. Functional Key
should to compute while read/write a data to/from a storage.
Example:
import { defineStore } from 'pinia'
import getKey from './getKey.js'
export const useCounterStore = defineStore({
id: 'counter',
state: () => ({
counter: 0
}),
persist: {
key: () => {
return getKey()
}
}
})
Thank you.
Suggested solution
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.