addons/ReactStateSetters.js
function(component, key) {
    // Memoize the setters.
    var cache = component.__keySetters || (component.__keySetters = {});
    return cache[key] || (cache[key] = createStateKeySetter(component, key));
  }
function(component, key) {
    // Memoize the setters.
    var cache = component.__keySetters || (component.__keySetters = {});
    return cache[key] || (cache[key] = createStateKeySetter(component, key));
  }
function ( component , key ) { // Memoize the setters. var cache = component . __keySetters || ( component . __keySetters = { } ) ; return cache [ key ] || ( cache [ key ] = createStateKeySetter ( component , key ) ) ; }
Returns a single-argument callback that can be used to update a single
key in the component's state.

Note: this is memoized function, which makes it inexpensive to call.

@param {ReactCompositeComponent} component
@param {string} key The key in the state that you should update.
@return {function} callback of 1 argument which calls setState() with
the provided keyName and callback argument.
Returns a single - argument callback that can be used to update a single key in the component s state .