@uservane/react-native: NativeController
Class: NativeController
Section titled “Class: 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
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”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
Parameters
Section titled “Parameters”ControllerDeps
Returns
Section titled “Returns”NativeController
Methods
Section titled “Methods”complete()
Section titled “complete()”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.
Parameters
Section titled “Parameters”result
Section titled “result”Returns
Section titled “Returns”void
dismiss()
Section titled “dismiss()”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
Returns
Section titled “Returns”void
getActive()
Section titled “getActive()”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
Returns
Section titled “Returns”getState()
Section titled “getState()”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.
Returns
Section titled “Returns”object
active
Section titled “active”active:
ActiveSurvey
apiBase
Section titled “apiBase”apiBase:
string
debug:
boolean
key:
string
localSuppression
Section titled “localSuppression”localSuppression:
Set<string>
pendingSurveys
Section titled “pendingSurveys”pendingSurveys:
string[]
rules:
BootstrapResponse
rulesFailed
Section titled “rulesFailed”rulesFailed:
boolean
rulesLoaded
Section titled “rulesLoaded”rulesLoaded:
boolean
sessionShown
Section titled “sessionShown”sessionShown:
Set<string>
traits
Section titled “traits”traits:
object
Index Signature
Section titled “Index Signature”[x: string]: unknown
userId
Section titled “userId”userId:
string
hide()
Section titled “hide()”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).
Returns
Section titled “Returns”void
identify()
Section titled “identify()”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
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
init()
Section titled “init()”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
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
resetForTests()
Section titled “resetForTests()”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
Returns
Section titled “Returns”void
setFetchImpl()
Section titled “setFetchImpl()”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.
Parameters
Section titled “Parameters”fetchImpl
Section titled “fetchImpl”(input, init?) => Promise<Response>
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”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
Parameters
Section titled “Parameters”listener
Section titled “listener”ControllerListener
Returns
Section titled “Returns”() => void
survey()
Section titled “survey()”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
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void