Typescript implement conditional props

前端 未结 0 536
北恋
北恋 2021-01-26 23:45

I have the following component, which can either contain an image or a text. Hence in JSX I check whether there\'s an image (because that means there must not be text vice versa

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