I am exporting a function from an external js file and trying to manipulate a Vue data bu that way but currently, I am not able to that. Here is what I tried so far :
Imported js file like this :
import * as device from "../Device";
Invoked the method like this :
device.playURL(this.currentTVChannelUrl,this.loading,this.isPlayerShown);
Here is the method named playURL inside device.js file :
export function playURL(url,loading,isPlayerShown){
player.play({
uri: url,
});
loading = false;
isPlayerShown = true;
}
It doesn't change the manipulative data of my Vue component. Is there a way to change them?
playURLin yourVue rootinstanceeventsanddispatchit from your child component