Skip to content

Instantly share code, notes, and snippets.

@samuelayo
Last active November 30, 2017 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelayo/58e1598b4a735f6db67c6ca63d60eee1 to your computer and use it in GitHub Desktop.
Save samuelayo/58e1598b4a735f6db67c6ca63d60eee1 to your computer and use it in GitHub Desktop.
import * as React from "react";
let Logo ="https://logrocket.com/img/logo.png";
export default class FirstComponent extends React.Component <{}> {
render() {
return (
<div>
{/* React components must have a wrapper node/element */}
<h1>A Simple React Component Example with Typescript</h1>
<div>
<img src={Logo} />
</div>
<p>I am a compinent which shows the logrocket logo. For more info on Logrocket, please visit Https://logrocket.com</p>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment