Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
⚗ - added compare in the componentDidUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
paulywill committed Apr 29, 2019
1 parent 80819c3 commit 48c1689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React, { Component } from 'react';
class Dashboard extends Component {


componentDidUpdate() {
if (this.props.email != undefined && this.props.email) {
componentDidUpdate(prevProps) {
if (this.props.email != undefined && this.props.email !== prevProps.email) {
// Do what you want with email
console.log(this.props.email)
}
Expand Down

0 comments on commit 48c1689

Please sign in to comment.