I am trying to access nested property of store state data but it is undefined when I try to access. I have following data
const state = {
entity: {
initial: {valid: false},
general: {valid: false},
buildFiles: {valid: false},
license: {valid: false},
author: {valid: false},
}
};
const getters = {
ENTITY: (state: any): Submission => {
return state.entity; // Works fine
},
INITIAL: (state) => {
console.log(state.entity); // Prints observable with entity and properties
console.log(state.entity.initial); // Prints undefined
return state.entity.initial;
},
};
All I am trying to do is use getters from the component. Is there any way I can access property intitial?
entitybefore checking getters?