Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript react function coponent props

interface Props {
  foo: string,
  bar: boolean
}

const MyReactComponent: React.FC<Props> = (Props) => {
	//Insert logic here
}

//Or

const MyReactComponent: React.FC<Props> = ({foo, bar}) => {
	//Insert logic here
}

 
PREVIOUS NEXT
Tagged: #typescript #react #function #coponent #props
ADD COMMENT
Topic
Name
7+3 =