Skip to content

@uservane/react-native: NativeController

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:48

new NativeController(deps?): NativeController

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:66

ControllerDeps

NativeController

complete(result): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:78

Submit a response with the server show-token and suppress re-prompt. Keeps the active survey mounted so the card can show honest thanks; call hide() after the thanks auto-dismiss.

SurveyCompleteResult

void


dismiss(): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:72

void


getActive(): ActiveSurvey

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:68

ActiveSurvey


getState(): object

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:84

Inspect for tests.

object

active: ActiveSurvey

apiBase: string

debug: boolean

key: string

localSuppression: Set<string>

pendingSurveys: string[]

rules: BootstrapResponse

rulesFailed: boolean

rulesLoaded: boolean

sessionShown: Set<string>

traits: object

[x: string]: unknown

userId: string


hide(): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:80

Clear the active survey (after thanks, or host-driven hide).

void


identify(opts): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:70

IdentifyOptions

void


init(opts): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:69

InitOptions

void


resetForTests(): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:100

void


setFetchImpl(fetchImpl): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:82

Test hook: replace fetch implementation on a live controller.

(input, init?) => Promise<Response>

void


subscribe(listener): () => void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:67

ControllerListener

() => void


survey(slug): void

Defined in: @[email protected]_react-native@0.86.0_@[email protected]_@[email protected]_react@[email protected]/node_modules/@uservane/react-native/dist/index.d.ts:71

string

void