peakchen90
peakchen90
@smtchahal Please replace `type MyComponentProps` with: ```ts type MyComponentProps = { name: string } ``` And it will work fine!
@smtchahal I mean this has nothing to do with `x-if` , it's the default behavior of Typescript
@smtchahal Oh, I understand, but maybe I cannot do something for it... It just a babel plugin
@PeiTianHuang Please provide your babel configuration.
@PeiTianHuang I tried it according to the information you provided. 1. Run `npx create-react-app ts-react-demo --template typescript` 2. Run `yarn eject` 3. Install `babel-plugin-react-directives` and `@babel/helper-create-regexp-features-plugin`(I don't know why I...
@PeiTianHuang I tried, `x-if` can also be used in .tsx, maybe it is caused by your other configuration or plugins, please try to put` react-directives` at the top of the...
@PeiTianHuang can you speak chinese?😂
@PeiTianHuang 找到一个类似的issues: https://github.com/ant-design/ant-design/issues/7798 你试一下把 `x-if` 改成其他属性,看下是否报错。如果也报一样的错误,看下 `PutCreateCtrl ` 组件的相关代码
@Ni55aN I have reproduced this problem and will try to solve it. It may take some time.
@Ni55aN I may not be able to do anything for the typescript transformer, and not consider the syntax of typescript at the beginning of development. And for this case, you...