Skip to content

Commit

Permalink
Class Properties and Initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
15Dkatz committed Oct 19, 2022
1 parent a28a72f commit dee7116
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions portfolio/src/App.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import React, { Component } from 'react';

class App extends Component {
constructor() {
super();
this.state = { displayBio: false };
state = { displayBio: false };

console.log('Component this', this);

this.toggleDisplayBio = this.toggleDisplayBio.bind(this);
}

toggleDisplayBio() {
toggleDisplayBio = () => {
this.setState({ displayBio: !this.state.displayBio });
}

Expand Down

0 comments on commit dee7116

Please sign in to comment.