Created
May 24, 2022 08:44
-
-
Save marcobiedermann/87f078246e2a20a143f1422e5c8845da to your computer and use it in GitHub Desktop.
React TypeScript
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, { ReactNode } from 'react' | |
interface ProjectProps { | |
children: ReactNode; | |
name: string; | |
} | |
function Project(props: ProjectProps): JSX.Element { | |
const { children, name } = props; | |
return ( | |
<div> | |
<h1>{name}</h1> | |
<div>{children}<div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment