Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

react array props typescript type

interface Props {
  propWhichIsArray: {
    id: ID; // I assume ID is defined elsewhere
    text: string;
  }[]
}

const Component: React.FC<Props> = ({ propWhichIsArray }) => {
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #array #props #typescript #type
ADD COMMENT
Topic
Name
4+8 =