fullstackreact/react-native-firestack

Trying to us Remote Config gives a stack overflow error.

ryanwalker opened this issue · 0 comments

I cannot find any examples of how to use remote config. I looked at the code and attempted the following:

import Firestack from 'react-native-firestack'
this.firestack = new Firestack();
console.log(firestack.remoteConfig.setDev());

I get an infinite loop that blows the stack. Looking in the code I see why. In firestack.js

  get remoteConfig() {
    if (!this.remoteConfig) {
      this.remoteConfig = new RemoteConfig(this._remoteConfig);
    }
    return this.remoteConfig;
  }

This will continue calling itself over and over again. Does remote config even work? What am I missing?