Skip to content

Commit

Permalink
docs(remote-config)!: update docs to be explicit about new behavior (#…
Browse files Browse the repository at this point in the history
…4169)

BREAKING CHANGE:

    fetchAndActivate
        Previous behaviour returned a boolean indicating if config values were activated
        New behaviour returns a boolean indicating if any config values were fetched remotely.

    activate
        Previous behaviour returned a boolean indicating if config values were activated
        New behaviour returns a boolean indicating if any local config values were activated.
  • Loading branch information
mikehardy committed Aug 28, 2020
1 parent fa5d0d7 commit 02527a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/remote-config/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export namespace FirebaseRemoteConfigTypes {

/**
* Moves fetched data to the apps active config.
* Resolves with a boolean value of whether the fetched config was moved successfully.
* Resolves with a boolean value true if new local values were activated
*
* #### Example
*
Expand Down Expand Up @@ -395,6 +395,7 @@ export namespace FirebaseRemoteConfigTypes {

/**
* Fetches the remote config data from Firebase, as defined in the dashboard. If duration is defined (seconds), data will be locally cached for this duration.
* Returns true only if new values were fetched, false otherwise.
*
* #### Example
*
Expand All @@ -410,7 +411,7 @@ export namespace FirebaseRemoteConfigTypes {
/**
* Fetches the remote config data from Firebase, as defined in the dashboard.
*
* Once fetching is complete this method immediately calls activate and returns a boolean value of the activation status.
* Once fetching is complete this method immediately calls activate and returns a boolean value true if new values were fetched
*
* #### Example
*
Expand All @@ -419,9 +420,9 @@ export namespace FirebaseRemoteConfigTypes {
* const fetchedRemotely = await firebase.remoteConfig().fetchAndActivate();
*
* if (fetchedRemotely) {
* console.log('Configs were retrieved from the backend and activated.');
* console.log('New configs were retrieved from the backend and activated.');
* } else {
* console.log('No configs were fetched from the backend, and the local configs were already activated');
* console.log('No new configs were fetched from the backend, and the local configs were already activated');
* }
* ```
*
Expand Down

1 comment on commit 02527a0

@vercel
Copy link

@vercel vercel bot commented on 02527a0 Aug 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.