Open Vednus opened 2 years ago
The problem was I was referencing push()
from the arSceneNavigator
property of the ref on the ViroARSceneNavigator
. But, if I call push()
directly on the ref of <ViroARSceneNavigator />
, then it works. I'm not sure if this is the way you want it to work. It seems like any reference to arSceneNavigator.push()
will have some scoping issues.
Facing the same issue with the ViroScene Component. I am getting TypeError: undefined is not an object (evaluating 'this.props')
Environment
Please provide the following information about your environment:
Description
I'm getting
undefined is not a function
here becauseincrementSceneReference
is undefined. I think it's a scoping issue where you need to bind your methods to this or instead use arrow functions. I haven't used class components in a while, so I'm a little rusty, but I'll keep investigating and try to find a solution.