Usage

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>
  );
}

Signatures

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

Type parameters

NameConstraintDefault
R——

Parameters

NameTypeRequiredDescription
toDestination<R>Yes—

Returns

Promise<R>

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.