mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-28 12:15:44 +08:00
Update quick-start.md
This commit is contained in:
@@ -39,10 +39,10 @@ import remoteConfig from '@react-native-firebase/remote-config';
|
||||
|
||||
async function getValues() {
|
||||
try {
|
||||
const activated = await config().fetchAndActivate();
|
||||
const activated = await remoteConfig().fetchAndActivate();
|
||||
|
||||
if (activated) {
|
||||
const experimentalFeatureEnabled = await config().getValue('experiment');
|
||||
const experimentalFeatureEnabled = await remoteConfig().getValue('experiment');
|
||||
console.log('Experimental source: ', experimentalFeatureEnabled.source);
|
||||
console.log('Experimental value: ', experimentalFeatureEnabled.value);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ have been fetched and activated, it is recommended you set default values using
|
||||
import remoteConfig from '@react-native-firebase/remote-config';
|
||||
|
||||
async function bootstrap() {
|
||||
await config().setDefaults({
|
||||
await remoteConfig().setDefaults({
|
||||
experiment: false,
|
||||
});
|
||||
}
|
||||
@@ -77,7 +77,7 @@ which are applied in a production application. This can be done with the `setCon
|
||||
import remoteConfig from '@react-native-firebase/remote-config';
|
||||
|
||||
async function bootstrap() {
|
||||
await config().setConfigSettings({
|
||||
await remoteConfig().setConfigSettings({
|
||||
isDeveloperModeEnabled: __DEV__,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user