Interface: SingleModuleOptions\<T>
Defined in: singles/types/SingleModuleOptions.ts:7
The construction parameters are mostly state that the SingleModule will be initialized with. This contains both the data of both the singleton itself and meta information about its status and how it is to be managed.
Type Parameters
T
T
Properties
attempted?
optionalattempted?:boolean
Defined in: singles/types/SingleModuleOptions.ts:32
Indicates whether we have attempted to fetch the data from its endpoint before. *
deleted?
optionaldeleted?:boolean
Defined in: singles/types/SingleModuleOptions.ts:40
Indicates that the resource this single is tracking has been deleted. *
endpoint?
optionalendpoint?:string
Defined in: singles/types/SingleModuleOptions.ts:26
The URL for the endpoint this single tracks. You can set this to # if you're only using this single for local state management. This will prevent the patchers from making bogus network requests.
failed?
optionalfailed?:boolean
Defined in: singles/types/SingleModuleOptions.ts:38
Indicates that our attempt to fetch the data has failed. *
fetching?
optionalfetching?:boolean
Defined in: singles/types/SingleModuleOptions.ts:34
Indicates whether we are currently waiting on the data to load from its endpoint. *
params?
optionalparams?:QueryParams|null
Defined in: singles/types/SingleModuleOptions.ts:42
The query string parameters used when performing network operations on the endpoint. *
persistent?
optionalpersistent?:boolean
Defined in: singles/types/SingleModuleOptions.ts:30
If set to true, the registry will not remove this module even if all listening components are removed.
ready?
optionalready?:boolean
Defined in: singles/types/SingleModuleOptions.ts:36
Indicates that we have fetched the component and x is now ready. *
x?
optionalx?:T|null
Defined in: singles/types/SingleModuleOptions.ts:21
Initial value for x, which is the data structure the module is tracking.
Default: null