5 Elegant ways to use Pinia 🍍

preview_player
Показать описание


0:00 Introduction
0:26 Using the Router within a Store and vice versa
Рекомендации по теме
Комментарии
Автор

For more expert Pinia content, check out VueMastery.com 🍍👉 vuemastery.com/courses/

VueMastery
Автор

Why does STORE need to manage routes at all? In my opinion, the storage should not contain logic at all, except for data modifications.

akdasa
Автор

It's funny seeing some comments criticise a CORE DEVELOPER WHO WROTE THE TOOLS he's discussing.

davidvelasquez
Автор

Thank you ...great tutorial .... one of the main reasons i switched from react to vue is Pinia ...really great, scaleable and easy state management Library :) :)

ahmaddawood
Автор

15:46 that PR you were talking about, is it merged yet? Does this work now?

dasten
Автор

setup functions are always 'the win'..
I was wondering why we couldn't just use `export router = blarblar` before.. and I am glad to find out.. Oh, you CAN..
I was told it didn't work like that.. but that was when vue3 was not official yet.. so I am glad we get back to the easy way again.

ColinRichardson
Автор

Something is wrong with that code. Store shoudn't know about router. For example if button trigger loggout there should be method that call some store with user logout and in the next line should be router.push. If u want to encapsulate this code u should use composable.

Wojtasvx