whole_func_string: function updater(prevState) {
      var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
      return state !== null && state !== undefined ? state : null;
    }
func_code_string: function updater(prevState) {
      var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
      return state !== null && state !== undefined ? state : null;
    }
func_documentation_string: Call this.constructor.gDSFP to support sub-classes. Use the setState() updater to ensure state isn't stale in certain edge cases.