With "vuex " I faced two problems : 1. Mutating state property directly and 2. while refreshing the page "vuex" state backs to its initial state. It will be great if you clear those concepts or show best practices.
Kostia Bazrov-WORK thats a good one , I was going to show how you can make an observable object using Vues observable , but I ran out of time. That could work to with inject
Vuex may appear a bit cumbersome in some situtations. Event bus also may be a nice way to pass data across different components (with or without relations).
hey tutorial was great but i have a api data and using it in a vue page ok and now i passing a part of it to vomponent and it work nicely but when i refreshing the page it wont send the data again can you guide me to make it to pass data even after page refreshing please?
Hi, thanks for video. But example with Vue.prototype don't work for me. In conole.log i have a vue is function and "Vue is a constructor and should be called with the `new` keyword". Can you help me, what could be the error ?
Nuxt: What if the parent component is the default.vue from the layouts folder, would you still be able to send data from the default.vue to your components from either the page's folder or component's folder?
such a great video. thank you erik .please make a video about how we can use vue with express and mongodb. i know it is very easy to use firebase for database with vue but mongo with vue is a little bit confusing for begginers like me. thank you in advance
Hi Erik, I have a Nuxt-Vuetify app which only has the default and index layouts. I'm trying $refs method to make changes on default.vue. If I add a {{ message }} on default's toolbar (v-app-bar and v-toolbar-tile) and change it from index.vue works perfect but didn't work on default's footer (v-footer v-row v-col), can you help me out? By the way, I really learn from your videos, you have high level of knowledge and know how to explain. Thanks.
do you have the git project where you have NOT made these changes already? I want to follow along the video but git project already has the changes so it makes no sense.
Right, but "this.$parent" is considered a bad practice, I think. Plus you're technically not "passing" the data, instead you're reaching out for the parent and getting that data.
i tried for hours to make Vue.prototype work and it doesn't...it baffles me that in this tutorial it works...and I don't understand why in mine is not....damn
With "vuex " I faced two problems : 1. Mutating state property directly and 2. while refreshing the page "vuex" state backs to its initial state. It will be great if you clear those concepts or show best practices.
PARRENT => provide() {return { myText: this.otherProps}}
Child => inject['myText']
Kostia Bazrov-WORK thats a good one , I was going to show how you can make an observable object using Vues observable , but I ran out of time. That could work to with inject
What about the event bus (emit)?
Vuex may appear a bit cumbersome in some situtations.
Event bus also may be a nice way to pass data across different components (with or without relations).
blokche_dev that’s another good one !
I couldn't agree more, just check this out: austincooper.dev/2019/08/09/vue-observable-state-store/
hey tutorial was great but i have a api data and using it in a vue page ok and now i passing a part of it to vomponent and it work nicely but when i refreshing the page it wont send the data again can you guide me to make it to pass data even after page refreshing please?
Inject method looks really useful. Thanks!
Hi Erik !
I am new in Vue js, and your tutorial is very helpful !
Thanks
Glad it helped
Hi, thanks for video. But example with Vue.prototype don't work for me. In conole.log i have a vue is function and "Vue is a constructor and should be called with the `new` keyword". Can you help me, what could be the error ?
more of this Erik. this is very helpful! developer from Philippines.
Nuxt: What if the parent component is the default.vue from the layouts folder, would you still be able to send data from the default.vue to your components from either the page's folder or component's folder?
such a great video. thank you erik .please make a video about how we can use vue with express and mongodb. i know it is very easy to use firebase for database with vue but mongo with vue is a little bit confusing for begginers like me. thank you in advance
OK!
Could you make some videos about Vuex persistent Data and Cookies?
Yes, my mind was blown while watching the video! Thank you so much! :)
Hi Erik, I have a Nuxt-Vuetify app which only has the default and index layouts. I'm trying $refs method to make changes on default.vue. If I add a {{ message }} on default's toolbar (v-app-bar and v-toolbar-tile) and change it from index.vue works perfect but didn't work on default's footer (v-footer v-row v-col), can you help me out? By the way, I really learn from your videos, you have high level of knowledge and know how to explain. Thanks.
Excellent tutorial buddy! Really enjoyed this
use cases of using refs and prototype?
Thanks for the overview Erik, I kinda wish there weren't so many ways, so that it is easier to follow convention
Yeah, you are right. Just pick the easiest way for you
do you have the git project where you have NOT made these changes already? I want to follow along the video but git project already has the changes so it makes no sense.
anyone knows how to pass data between two components that aren't related. Thanks
Then you'll need to use something like vuex
@@ProgramWithErik Yeah thank you, i also found out i could use something called 'Bus event' it did pretty good job
This is the best formula of passing data in different ways.
$parent is golden. I've built a ton of Vue apps and never knew about that one.
thx very informative video
props + this.$parent is the fastest one for direct child / father exchange
Right, but "this.$parent" is considered a bad practice, I think. Plus you're technically not "passing" the data, instead you're reaching out for the parent and getting that data.
IT'S DOPE
i tried for hours to make Vue.prototype work and it doesn't...it baffles me that in this tutorial it works...and I don't understand why in mine is not....damn
How about Fire.$emit 😁, but thanks for this videos, excelent!
Yes! I didn't mention that but yes
Why not use events? That's the first thing that came to mind.
To favs. Thanks
the sixth way is using bus !
Yes, I thought about showing that, maybe next video
Parent: window.message = 'thisisaverygoodidea';
Child: setInterval(() => this.message = window.message, 1337);
How to call child method from parent
We have index page all child page loaded inside of index page using routing.
We require to consume method of child page from index
What about $emit ?? 😲😮😱😱😳😬
I was here hoping to find some $event in here..?!
Second
First!
Vuex has a terrible API.
I am a React developer. After watching this video, it reminds me of Angularjs 1.x days..
Your intro should be smaller