Guest User

Untitled

a guest
May 26th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. export class MyComponent extends React.Component {
  2. componentDidUpdate(prevProps: PersonMatchingHomeProps) {
  3. const { results, isLoading } = this.props;
  4.  
  5. if ((isLoading === prevProps.isLoading && prevProps.results === results) || isLoading) {
  6. return;
  7. }
  8.  
  9. // do stuff
  10. }
  11.  
  12. render() {
  13. return <Spinner show/>;
  14. }
  15. }
Add Comment
Please, Sign In to add comment