首页 > 解决方案 > 在使用 typescript 的 react-native 应用程序上遇到一些奇怪的问题

问题描述

重新安装软件包后,我突然遇到以下问题,该应用程序运行正常,但它给了我以下打字稿错误,我发现我的 redux 版本从 4.0.4 更改为 4.0.5,我恢复了但仍然出现错误

Argument of type 'StoreEnhancer<{ dispatch: {}; }, {}>' is not assignable to parameter of type 'StoreEnhancer<{}, {}>'.
  Types of parameters 'next' and 'next' are incompatible.
    Types of parameters 'preloadedState' and 'preloadedState' are incompatible.
      Type 'DeepPartial<S> | undefined' is not assignable to type 'PreloadedState<S> | undefined'.
        Type 'DeepPartial<S>' is not assignable to type 'PreloadedState<S>'.
   composeEnhancers(applyMiddleware(epicMiddleware, reduxLogger))

标签: reactjstypescriptreact-nativereduxreact-redux

解决方案


我从我的应用程序中删除了 react-native-elements 并且没有再次收到错误,不确定,但似乎该库有很多问题,它不是一个稳定的。


推荐阅读