Navigation.push() thinks componentId is a stack, but it is a component
Issue Description
When calling Navigation.push() giving it the componentId which is passed to the component as a parameter, on Android I get this error - Error: Failed to execute stack command. Stack CustomComponent10 not found..
What happens is that RNN thinks that CustomComponent10 is a stack but it is not, it is a component which is a child of a stack, the wanted behaviour is that RNN pushes a screen above the componentId specified in the parameters. This is only happening in a certain screen while all others screen work fine, and this is only an issue with Android.
Environment
- React Native Navigation version: 4.0.8
- React Native version: 0.61.5
- Platform(s) (iOS, Android, or both?): Android
- Device info (Simulator/Device? OS version? Debug/Release?): both simulator and device, all OS versions
@idanlo Did you fix this? What is the solution?
I'm having a similar issue with a stack within an overlay. @idanlo did you solve it?
@zabojad I fixed it by giving my stack a stackID and pushing using the stackID instead of this.props.componentID
Naviagation.setRoot({
root: {
stack: {
id: 'myStack'
}
}
});
then:
Navigation.push('myStack', 'myScreen');
Any update on this, is it supposed to be a Stack Id that gets passed?
Contradiction here: https://stackoverflow.com/questions/56321858/why-is-this-props-componentid-needed
In my own app, we're passing Stack Id when pushing screens because otherwise it crashes... This probably means the Back button will never work which is frustrating.
But I don't know, the docs re. simple navigation is very hard to read. Complex actions are possible with this library but simple actions are very difficult.