Skip to content

ExpoGreeterModule

Defined in: ExpoGreeterModule.ts:10

The native module's API, available as the package's default export.

Listen to its events with useEvent(ExpoGreeter, 'onChange') from expo, or with addListener.

Extends

Properties

defaultName

defaultName: string

Defined in: ExpoGreeterModule.ts:12

The name hello greets when options.name is not given: "world".

Methods

hello()

hello(options?): string

Defined in: ExpoGreeterModule.ts:25

Builds a greeting.

Parameters

options?

GreetingOptions

Who to greet and how; omitted fields take their defaults.

Returns

string

The greeting, e.g. "Hello, world.".

Example

ExpoGreeter.hello({ name: 'Ada', excited: true }); // "Hello, Ada!"

setValueAsync()

setValueAsync(value): Promise<void>

Defined in: ExpoGreeterModule.ts:28

Emits onChange with value.

Parameters

value

string

Returns

Promise<void>