gpt4 book ai didi

react-native - 远程 redux devtools 停止工作

转载 作者:行者123 更新时间:2023-12-04 04:24:39 25 4
gpt4 key购买 nike

之前已经问过这个问题,但我找不到可行的解决方案,所以我冒昧地展示我的代码,以防万一我遗漏了一些东西。我有一个 native 应用程序并使用 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”

这是我在控制台中得到的错误。 enter image description here

任何帮助将不胜感激!

最佳答案

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

adb reverse tcp:5678 tcp:5678

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

关于react-native - 远程 redux devtools 停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51831096/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com