diff --git a/09_Day_Conditional_Rendering/09_conditional_rendering.md b/09_Day_Conditional_Rendering/09_conditional_rendering.md index aa212db..ea0dcc6 100644 --- a/09_Day_Conditional_Rendering/09_conditional_rendering.md +++ b/09_Day_Conditional_Rendering/09_conditional_rendering.md @@ -34,7 +34,6 @@ import ReactDOM from 'react-dom' // class based component class Header extends React.Component { render() { - console.log(this.props.data) const { welcome, title, @@ -44,7 +43,7 @@ class Header extends React.Component { } = this.props.data return ( -
+

{welcome}

{title}

@@ -74,7 +73,7 @@ class App extends React.Component { firstName: 'Asabeneh', lastName: 'Yetayeh', }, - date: 'Oct 7, 2020', + date: 'Oct 9, 2020', } // conditional rendering using if and else statement @@ -140,7 +139,7 @@ class Header extends React.Component { } = this.props.data return ( -
+

{welcome}

{title}

@@ -236,7 +235,6 @@ const buttonStyles = { // class based component class Header extends React.Component { render() { - console.log(this.props.data) const { welcome, title, @@ -246,7 +244,7 @@ class Header extends React.Component { } = this.props.data return ( -
+

{welcome}

{title}

@@ -337,7 +335,6 @@ const buttonStyles = { // class based component class Header extends React.Component { render() { - console.log(this.props.data) const { welcome, title, @@ -347,7 +344,7 @@ class Header extends React.Component { } = this.props.data return ( -
+

{welcome}

{title}

@@ -505,21 +502,25 @@ class App extends React.Component { date: 'Oct 9, 2020', } - const status = this.state.loggedIn ? : + // We can destructure state + + const { loggedIn, techs } = this.state + + const status = loggedIn ? : return (
{status}