Last active
March 29, 2020 17:55
-
-
Save JoshuaKGoldberg/9b4fd7b3b9d6df2566d23db7a6e8815d to your computer and use it in GitHub Desktop.
React Components Options
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
// Option one?? | |
interface MyThingProps { /* ... */ }; | |
function MyThing({ text }: MyThingProps { /* ... */ }; | |
// Option two?? | |
type MyThingProps = { /* ... */ }; | |
const MyThing = ({ text }: MyThingProps) => { /* ... */ }; | |
// Option three?? | |
type MyThingProps = { /* ... */ }; | |
const MyThing: React.FC<MyThingProps> = ({ text }) => { /* ... */ }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment