【问题标题】:How to change version of react typescript typings that expo (react native) requires?如何更改expo(react native)需要的react typescript类型的版本?
【发布时间】:2022-06-13 02:27:04
【问题描述】:

关于 react-native + expo,我想使用最新的 @type/react 来解决打字问题(即 'MaterialIcons' 不能用作 JSX 组件),但 expo start 总是要求我安装打字稿库,然后继续坚持它们是旧版本(17.0.21)。为什么?我怎么能忽略这种行为(顺便说一句。用'n'回答结束启动并指示安装打字稿要求或清理打字稿参考的配置 - 好的expo谢谢!)

我使用@types/react 解决的问题在此处详细说明:'Stack.Navigator' cannot be used as a JSX component

【问题讨论】:

    标签: react-native expo


    【解决方案1】:

    更新到 "@types/react": "~18.0.12" ( 修复 eslint ) 但你不能运行项目

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-16
      • 2018-09-18
      • 2018-11-12
      • 1970-01-01
      • 2022-06-14
      • 2021-10-13
      • 2020-05-27
      • 1970-01-01
      相关资源
      最近更新 更多