Last active
September 18, 2018 15:25
-
-
Save reciosonny/99afd62c411dec411d7b4cb2fba07943 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
// import axios from 'axios'; | |
import AnotherComponent from './AnotherComponent'; | |
import Todo from './Todo'; | |
import ParentComponent from './ParentComponent'; | |
export default class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
val: "Click me to change me" | |
} | |
console.log("constructor executed"); | |
} | |
componentDidMount = () => { | |
console.log("componentDidMount() executed"); | |
} | |
static getDerivedStateFromProps(nextProps, prevState) { | |
console.log("getDerivedStateFromProps() executed"); | |
} | |
render() { | |
console.log("component rendered.."); | |
return ( | |
<div> | |
<h2> | |
<AnotherComponent /> | |
<Todo /> | |
</h2> | |
</div> | |
) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment