Utilização

Return a result from a presented screen

tsx
import { Button, present, routes } from 'kuito';

export function NewNote() {
  return (
    <Button
      onPress={async () => {
        const note = await present(routes.compose()); // string | undefined
        if (note) console.log(note);
      }}
    >
      New note
    </Button>
  );
}

Assinaturas

ts
<R>(to: Destination<R>): Promise<R | undefined>

Parâmetros de tipo

NomeRestriçãoPredefinição
R——

Parâmetros

NomeTipoObrigatórioDescrição
toDestination<R>Sim—

Devolve

Promise<R>

Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.