Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import shallowEqual from 'react/lib/shallowEqual';
- class PureRenderComponent extends React.Component {
- shouldComponentUpdate(nextProps, nextState) {
- return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);
- }
- }
Add Comment
Please, Sign In to add comment