Skip to content

Instantly share code, notes, and snippets.

@BretCameron
Created November 15, 2019 17:59
Show Gist options
  • Save BretCameron/3176fb26524fa7373e02c0a46bc5fc54 to your computer and use it in GitHub Desktop.
Save BretCameron/3176fb26524fa7373e02c0a46bc5fc54 to your computer and use it in GitHub Desktop.
The parent component for the counter Typescript examples
import React, { FC } from "react";
import "./App.css";
import FunctionalCounter from "./components/FunctionalCounter";
import ClassCounter from "./components/ClassCounter";
const App: FC = (): JSX.Element => {
return (
<>
<div className="flex">
<FunctionalCounter title={"Functional Counter"} initialCount={10} />
<ClassCounter title={"Class Counter"} initialCount={10} />
</div>
</>
);
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment