Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/replace"

Index

Functions

Functions

replace

  • replace(screen: ScreenComponentClass, props?: undefined): void
  • replace<P, C>(screen: ScreenComponentClass<C>, props: P): void
  • Replaces the current screen at the top of the stack

    example
    screen/Main/Component.tsx ```ts import * as React from 'react'; import { replace } from '@ef-carbon/react-native-navigation';

    import OtherScreen from '../OtherScreen';

    export class MyScreen extends React.PureComponent { private readonly navigateToNavigation = (): void => { // This does type checked pushing of a new screen to the stack replace(OtherScreen, { firstName: 'Joe', secondName: 'Bloggs' }); } } `

    Parameters

    • screen: ScreenComponentClass

      the screen that should replace the current screen

    • Optional props: undefined

      the type checked properties for the screen

    Returns void

  • Type parameters

    • P

    • C: P

    Parameters

    • screen: ScreenComponentClass<C>
    • props: P

    Returns void