使用Typescript 4.1.5, react ts template项目 , store.ts中的"Se"有类型报错
zjhken opened this issue · 4 comments
zjhken commented
复现方式:
- npx create-react-app demo-app --template concent-ts
- 使用VS Code打开, 稍等片刻就能见到 ./src/types/store.ts文件中, 所有的Se都是报类型错误
影响:
项目编译失败, 无法运行
zjhken commented
Here is the English version:
Title: When using TypeScript 4.1.5, there are type errors in the react template project. Mainly happens in the store.ts file.
How to reproduce:
- npx create-react-app demo-app --template concent-ts
- Open it with VS Code, just wait for a moment until the editor indexed all the codes, then you can see the type error in this folder: ./src/types/store.ts. All the "Se" type has this warning.
Impact:
Run project failed.
fantasticsoul commented
你好,问题已经修复了,欢迎重新安装再体验,但貌似cra有更新延迟,你可以克隆模板原项目直接运行
git clone git@github.com:concentjs/cra-project-concent-ts.git
现在cra也正常了,执行
npx create-react-app demo-app --template concent-ts
可以正常运行了
zjhken commented
Thanks for you fast action! I just test, it works perfectly.
fantasticsoul commented
Thanks for you fast action! I just test, it works perfectly.
Cool, just notice useSetup
in App.tsx, it gives you a totally new way to organize your logic code(including event, ref computed, lifecycle etc features)😀