react-native - 将 Overmind DevTools 与 React Native 结合使用

标签 react-native expo

我无法使用 React Native 连接到 Overmind Devtools。我使用 Expo 并通过 LAN 上的 iPad 连接到它。

根据 this帖子,应该可以从任何地方连接到 Overmind Devtools,因为它是一个 Electron 应用程序,但我不知道如何。

在我的 iPad 上,我收到这条消息:

OVERMIND DEVTOOLS: Not able to connect. You are trying to connect to "localhost:3031", but there was no devtool there. Try the following:
   - Make sure you are running the latest version of the devtools, using "npx overmind-devtools@latest" or install latest extension for VSCode
   - Close the current tab and open a new one
   - Make sure the correct port is configured in the devtools

这是有道理的,因为在 iPad 的本地主机上肯定没有运行 Overmind Devtools,但我不知道如何连接它。

非常感谢任何帮助!

最佳答案

您可以将配置传递给 createOvermind 并指定主机和端口,如下所示:

const overmind = createOvermind(config, { devtools: 'http://0.0.0.0:3031' })

relevant spot in docs

关于react-native - 将 Overmind DevTools 与 React Native 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58787980/

相关文章:

javascript - 无法在 react 导航堆栈中居中标题 - React-Native?

javascript - (博览会)React Native 从服务器获取数据后不更新状态

react-native - 存档时"Command PhaseScriptExecution failed with a nonzero exit code"

react-native - 如果聚焦,如何更改文本颜色?

ios - android上axios发布请求网络错误

javascript - api.cache(true) 在 Expo 的 babel.config.js 中做了什么?

javascript - 为什么用成功 promise 调用 catch ?

android - 如何偏移 RefreshControl

node.js - Npm/Yarn 未正确安装并出现问题

react-native - 如何通过 webview 方法在 React-native 中旋转 View