Guest User

Untitled

a guest
Jul 30th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import React from 'react';
  2. import shallowEqual from 'react/lib/shallowEqual';
  3.  
  4. class PureRenderComponent extends React.Component {
  5. shouldComponentUpdate(nextProps, nextState) {
  6. return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);
  7. }
  8. }
Add Comment
Please, Sign In to add comment