Search code examples
javascriptreactjstypescripttsx

What is the use of nesting one component into another


I am new to typescript, trying to understand one syntax that i came across

  <PTable<OpsQL.IReportFile>
      data-test="Reporting"
      {...props}
    />

What is the use of OpsQL.IReportFile .Is it a constraint or something else.


Solution

  • PTable is a generic component and <OpsQL.IReportFile> is the generic type argument passed to the component.