Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes

后端 未结 7 2977
梦如初夏
梦如初夏 2020-12-15 02:42

i am currently making a simple react application. this is my index.tsx

import * as React from \'react\';
import * as ReactDOM from \'react-dom\         


        
7条回答
  •  暖寄归人
    2020-12-15 03:06

    The issue is that you are not exporting the interface, you should always export the interface props. So:

    export interface Props {
      term: string;
    }
    

    Is the solution.

提交回复
热议问题