findScreen<P>(screen: ScreenComponentClass<P>): number
Type parameters
P
Parameters
screen: ScreenComponentClass<P>
Returns number
pop
pop<P>(countOrScreen?: number | ScreenComponentClass<P>): void
Pops a screen, or multiple, from the stack
throws
{RangeError} if countOrScreen was a screen and was not found in the stack
example
screen/Main/Component.tsx
```ts
import * as React from 'react';
import { pop } from '@ef-carbon/react-native-navigation';
export class MyScreen extends React.PureComponent {
private readonly navigateToNavigation = (): void => {
// Pop all screen that are above this screen in the stack
pop(MyScreen);
// Pop last screen
pop();
// Pop multiple screens
pop(2);
}
}
`
Type parameters
P
Parameters
Default value countOrScreen: number | ScreenComponentClass<P> = 1
the number of screens to pop from the stack. This can also be a screen that is already in the
stack, all screens up to that screen will be popped
Pops a screen, or multiple, from the stack
{RangeError} if
countOrScreen
was a screen and was not found in the stackexport class MyScreen extends React.PureComponent { private readonly navigateToNavigation = (): void => { // Pop all screen that are above this screen in the stack pop(MyScreen);
// Pop last screen pop(); // Pop multiple screens pop(2);
} }
`