score:1

Accepted answer
let unsubscribe;
class Nav extends Component {
  state = {
    isSignedIn: true
  }

  componentDidMount = () => {
    unsubscribe = firebase.auth().onAuthStateChanged(user => {
      this.setState({
        isSignedIn: user
      })
    })
  }
  componentWillUnmount() {
    unsubscribe()
  }

score:1

    this.setState({ someOtherRefs: certainValue });

Related Query

More Query from same tag