【问题标题】:remote redux devtools stopped working远程 redux devtools 停止工作
【发布时间】:2019-01-20 16:49:57
【问题描述】:

之前有人问过这个问题,但我找不到可行的解决方案,所以我冒昧地展示我的代码,以防我遗漏了什么。我有一个反应本机应用程序并使用 redux。我已经在这个项目上使用 remote-redux-devtools 两个月了,但是该工具突然停止工作。我在控制台中收到“SocketProtocolError”,并将其粘贴到下面以及我的代码中。

Redux 商店

import { createStore, applyMiddleware } from "redux";
import { composeWithDevTools } from "remote-redux-devtools";
import thunk from "redux-thunk";
import reducers from "../../State/reducers/index";

const composeEnhancers = composeWithDevTools({ realtime: true });

const store = createStore(
  reducers,
  {},
  composeEnhancers(applyMiddleware(thunk))
);

export default store;

在我的 package.json 文件中,我使用的是“remote-redux-devtools”:“^0.5.13”

这是我在控制台中遇到的错误。

任何帮助将不胜感激!

【问题讨论】:

    标签: react-native redux remote-debugging redux-devtools


    【解决方案1】:

    我通过运行在手机上调试应用程序时修复了同样的错误:

    adb reverse tcp:5678 tcp:5678
    

    允许手机连接到开发工具。如果使用不同的端口号,请调整端口号。如果您在计算机上的模拟器中运行应用程序,这可能无济于事。

    【讨论】:

      猜你喜欢
      • 2016-09-14
      • 2023-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-16
      • 1970-01-01
      相关资源
      最近更新 更多