'use strict';

var update = require('react/lib/update');
var shallowEqual = require('react/lib/shallowEqual');
var lastPath;

module.exports = {
  shouldComponentUpdate: function(nextProps, nextState) {
    var routeChanged = this.getPath && didPathChange(this.getPath());
    return this.impure ||
      routeChanged ||
      !shallowEqual(this.props, nextProps) ||
      !shallowEqual(this.state, nextState);
  },

  updateState: function(t, cb) {
    return this.setState(update(this.state, t), cb);
  }
};

function didPathChange(currPath) {
  var pathChanged = lastPath !== currPath;
  lastPath = currPath;
  return pathChanged;
}
@@ -108,233 +108,470 @@
 ');%0A
-var lastPath;%0A%0Amodule.exports = %7B%0A  shouldComponentUpdate: function(nextProps, nextState) %7B%0A    var routeChanged = this.getPath && didPath
+%0Afunction equal(a, b) %7B%0A    if (a == null && b == null) %7B%0A      return true;%0A    %7D%0A    return shallowEqual(a, b);%0A%7D%0A%0Amodule.exports = %7B%0A  shouldComponentUpdate: function(nextProps, nextState, nextContext) %7B%0A    var currentPath = this.getPath ? this.getPath() : null;%0A    var route
 Change
-(
+d = 
 this.
-ge
+_lastPath !== curren
 tPath
-())
 ;%0A
+%0A
     
-return this.impure %7C%7C%0A      routeChanged %7C%7C%0A      !shallowE
+var contextChanged = !equal(this.context, nextContext);%0A    var stateChanged = !equal(this.state, nextState);%0A    var propsChanged = !e
 qual
@@ -597,276 +597,268 @@
 ops)
- %7C%7C
+;%0A
 %0A    
-  !shallowEqual(this.state, nextState);%0A  %7D,%0A%0A  updateState: function(t, cb) %7B%0A    return this.setState(update(this.state, t), cb);%0A  %7D%0A%7D;%0A%0Afunction didPathChange(currPath) 
+this._lastPath = currentPath;%0A%0A    return this.impure %7C%7C routeChanged%0A      %7C%7C propsChanged %7C%7C stateChanged%0A      %7C%7C contextChanged;%0A  %7D,%0A%0A  updateState: function(t, cb) %7B%0A    return this.setState(function(state)
 %7B%0A  
+ 
-var pathChanged = la
+   update(
 st
-P
 at
-h !== currPath;%0A  lastPath = currPath;%0A  return pathChanged
+e, t);%0A    %7D, cb);%0A  %7D%0A%7D
 ;%0A
-%7D

fix pure.js