React - TypeScript adding undefined to prop even though defaultProps are defined

后端 未结 0 1998
无人及你
无人及你 2020-12-20 13:08

Why does the following doing the following:

type Props = {
  name?: string
  age: number
}

const Test = FC = (props) => {
  return (
    <         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题