Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created January 27, 2020 16:30
Show Gist options
  • Save azamsharp/33bee5daff3e79a9c9f7bb105e62722c to your computer and use it in GitHub Desktop.
Save azamsharp/33bee5daff3e79a9c9f7bb105e62722c to your computer and use it in GitHub Desktop.
import React,{ Component } from "react";
class DisplayName extends Component {
render() {
return <h1>Hello {this.props.name}, age is {this.props.age}</h1>
}
}
export default DisplayName
import React, {Component} from 'react';
import logo from './logo.svg';
import './App.css';
import Header from './Header'
import DisplayName from './DisplayName';
class App extends Component {
// render is a required function of a Component
// JSX
render() {
return (
<div>
<Header />
<DisplayName name = "John" age="30" />
<h1>FOOTER</h1>
</div>
)
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment