To initialize a store I have
document.addEventListener('alpine:init', () => {
Alpine.store('selectedInput', 0)
})
But when I do this in a function further down, it doesn't update selectedInput
:
function example() {
Alpine.store('selectedInput', 3)
}