Skip to content

Instantly share code, notes, and snippets.

@mcpar-land
Last active November 8, 2019 18: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 mcpar-land/50f3efbd143ff12b1464a7a7e9f9299c to your computer and use it in GitHub Desktop.
Save mcpar-land/50f3efbd143ff12b1464a7a7e9f9299c to your computer and use it in GitHub Desktop.
JSDoc for React functional component props
/**
* @type {React.FC<{
* propertyOne: string,
* propertyTwo: ComplicatedClass<GenericType>,
* propertyThree: any,
* propertyFour: (fxnArg: object) => string
* }>}
*/
const ComplicatedComponent = ({propertyOne, propertyTwo, propertyThree, propertyFour}) => {
// ...
return <>
{/* ... */}
</>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment