Here is my code snippet which I am using, everything is working as expected but only issue is that fetchAndActivate method fetches all value from remote and caches them. Is there any way of feching and activating only single value from remote config?
fetchAndActivate(remoteConfig).then(
_res => {
const val = getValue(remoteConfig, "MPEmptyCartRecos");
const value = JSON.parse(val.asString());
this.setState({widgetConfigResponse: value});
},
err => {
console.log("error >>>>>", err);
}
);
There is no way to fetch just a single value from Remote Config, but of course your code can decide to use only one of the fetched values.