I am having a very frustrating issue. I set my variable in constructor like this:
export class ChannelTransition{
constructor(props) {
this.transitionHandler=props;
}
channelTransitionSetup(channelsList) {
console.log(this.transitionHandler.handleHeaderTransition);
}
}
And now when I try to access that variable set on constructor I get undefined. I know it has sth to do with scope but then how can I access my variable in constructor?
transitionHandlerhas a property calledhandleHeaderTransition? Otherwise this is correct.propshas any property namedhandleHeaderTransition? Did you debugged the code? What values did you get in the constructor fortransitionHandlerafter setting it? what values are you getting insidechannelTransitionSetupfortransitionHandlerbefore callingthis.transitionHandler.handleHeaderTransition?