Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

amine_22's avatar

vuejs 3.2 and vuex 4.1 this.$store is undefined

i use mapaction to call method in action i have message error this.$store is undefined when he call this.$store.dispach but i use vuex 4.1 ...mapActions({ signIn:'auth/login' }), async login(){ this.processing = true await axios.get('/sanctum/csrf-cookie')

        await axios.post('/login',this.auth).then(({data})=>{
              
            this.signIn()
        
        }).finally(()=>{
            this.processing = false
        })
    },
0 likes
1 reply

Please or to participate in this conversation.