sveltefire
sveltefire copied to clipboard
Firebase Remote Config
This PR adds support for Firebase RemoteConfig through multiple components:
RemoteConfig: This component instantiates a firebase RemoteConfig instance from the FirebaseApp. The big challenge with RemoteConfig is the SDK to require a browser context to be able to start. My solution is to create the remoteConfig instance in theonMountlifecycle hook. The downside is the need for the app to be passed in the context.RemoteConfigString: Fetch a string variable from RemoteConfigRemoteConfigNumber: Fetch a number variable from RemoteConfigRemoteConfigBoolean: Fetch a boolean variable from RemoteConfigRemoteConfigValue: Fetch a variable from RemoteConfig in the raw Value format
These components support the default value configured in RemoteConfig when configured.