createRemoteConfigStringStore()
createRemoteConfigStringStore(remoteConfig, key, options)
creates a store that will
activate the current remoteconfig instance. The store contains a string value retrieved from the
remote config.
Parameters
remoteConfig: RemoteConfig
- The remote config instance. If you put the component at the root of your app, or higher than where you're using this store, you can usenull
orundefined
as the parameter and the store will retrieve the database instance from the context.key: string
- The remote config key.options?: RemoteConfigStoreOptions<string>
Properties
subscribe: ((val: string) => void)) => void
- Subscribe method for the Svelte store. Allows for the `$store` syntax.loading: boolean
- When the remote config key is loading.error: unknown
- Error if any.
Types
interface RemoteConfigStoreOptions<T> {
subscribe: (val: string) => void;
loading: boolean;
error: unknown;
}