Open HugoHeneault opened 6 years ago
@HugoHeneault Thanks your feedback, but I'm sorry to that I have no idea for this. Is there anyone can help me?
I've got the same issues for about every array manipulation: array.push
, array.splice
, array[index] = ...
I think there is something wrong with your observables but I can't find where you're setting them. :(
I made a stackblitz so anyone can see the issue: https://stackblitz.com/edit/vue-mobx-array-issue?file=model.js
I'll try to have a look but I don't understand yet how mobx and vue are watching changes.
@HugoHeneault What vue-mobx do is just collect observable prop by @observable
in mobx(code is here). Then call defineReactive
method of vue(code is here).
So you're not using mobx reactive system but only faking it with defineReactive
? 🙂
I don't know it whether using mobx reactive system. But the purpose of calling the defineReactive
method is to use vue reactive system
I was really excited of seing mobx ported into Vue. Thank you so much!
I got stuck for quite awhile because I used
array.push
and it wasn't detecting my changes.Here's my code:
app.js
mobx/Board.js
components/ExampleComponent.vue
Working with
It's working if I use
Do you know what's wrong here?
Thanks alot!