Created
June 6, 2022 09:58
-
-
Save Blazing-Mike/27f8d803aa0edb4195373dac317b57f3 to your computer and use it in GitHub Desktop.
destructuring in react class component
This file contains hidden or 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
class Greeter extends React.Component { | |
render() { | |
const {first, last} = this.props; | |
return <h1>Hello, {first} {last}</h1>; | |
} | |
} | |
ReactDOM.createRoot(document.getElementById("root")).render( | |
<Greeter first="Srini" last="Kata" /> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment