I try to set a value on a property in the "created" lifecycle method - on the server - but the value remains null (its default value).
(I use typescript and class based components)
export default class FunClass extends Vue {
@Prop() data!: any;
myProp : any = null;
created() {
if (process.server) {
this.myProp = this.data.interestingData;
}
}
}
So there must be some rule that I missed?
I tried asyncData
but it only works on pages (and I can't access any props from there).