vue-componentnativescript-vuelifecycle-hook

nativescript-vue cannot read data property in lifecycle hooks


im reading nfc tags through my created hook and I would like to pass them to my data properties. It shows me that I cannot read or set the property 'currentArticle'. I tried suggestions like

let self = this

self.currentArticle

but it did not work. Some people say you should have access to data variables like:

this.currentArticle

That way doesn't work as well. Any suggestions?


Solution

  • I solved it through declaring let self = this at the beginning of the created hook. Then I simply used the self.currentArticle as I already talked about the suggestions I have seen about this problem.