Sign in
Log inSign up
Sathya Molagoda

2 likes

·

497 reads

5 comments

Nayanajith Priyasad
Nayanajith Priyasad
May 25, 2022

Superb Content 👌

1
·
·1 reply
Sathya Molagoda
Sathya Molagoda
Author
·May 25, 2022

Thank you

·
Eslam Ahmed
Eslam Ahmed
May 31, 2022

Is provide/inject is an alternative to vuex? or do they just work together?

1
·
·2 replies
Sathya Molagoda
Sathya Molagoda
Author
·Jun 1, 2022

At first glance, they both look the same, but Dependency Injection or as you requested provider/injection works with the component tree and allows you to inject data provided by a component at a higher level in the component hierarchy to a child component. On the other hand, Vuex lets you access stored states from anywhere in the project, regardless of the component hierarchy. You can use both together.

3
·
Eslam Ahmed
Eslam Ahmed
Jun 3, 2022

Sathya Molagoda Thank you ❤

1
·