简体   繁体   English

reSolve 和 React Native 集成

[英]reSolve and React Native integration

Is there any working example available involving reSolve in React Native?在 React Native 中是否有任何涉及reSolve的工作示例? Suggestions of comparable solutions (running without any back-end connectivity in place) either in React Native or Flutter are also most appreciated.在 React Native 或 Flutter 中提供可比较的解决方案(在没有任何后端连接的情况下运行)的建议也非常受欢迎。

GitHub contains an example in the reimagined/react-native-example repository but unfortunately it isn't working. GitHub 在reimagined/react-native-example存储库中包含一个示例,但不幸的是它不起作用。 It seems the current version is pretty outdated.当前版本似乎已经过时了。

Referring to that repository, the command yarn create resolve-app -e shopping-list-advanced shopping-list-advanced results in the following error message.参考该存储库,命令yarn create resolve-app -e shopping-list-advanced shopping-list-advanced会导致以下错误消息。

Error: No such example, shopping-list-advanced.错误:没有这样的示例,高级购物清单。 The following examples are available以下示例可用

So you are unable to download the sample code since it does not appear to exist.因此,您无法下载示例代码,因为它似乎不存在。

So I tried downloading and inflating the ZIP manually.所以我尝试手动下载和充气 ZIP。 Afterwards I ran yarn install (which takes a while and reports quite a lot of warnings).之后我运行了yarn install (这需要一段时间并报告了很多警告)。 Next, I used the command yarn start:native .接下来,我使用了命令yarn start:native This doesn't work either and results in the following error message.这也不起作用,并导致以下错误消息。

ERROR: Node.js version 16.13.2 is no longer supported.错误:不再支持 Node.js 版本 16.13.2。
expo-cli supports following Node.js versions: expo-cli 支持以下 Node.js 版本:
>=10.13.0 <11.0.0 (Active LTS) >=10.13.0 <11.0.0(活动 LTS)
>=12.0.0 <13.0.0 (Active LTS) >=12.0.0 <13.0.0(活动 LTS)
>=13.0.0 <14.0.0 (Current Release) >=13.0.0 <14.0.0(当前版本)

In an attempt to solve the problem, I updated the expo-cli version in the native\package.json file to 5.0.3.为了解决这个问题,我将 native\package.json 文件中的 expo-cli 版本更新为 5.0.3。 Running yarn install and yarn start:native again results in a new error message being thrown error.再次运行yarn installyarn start:native会导致新的错误消息被抛出错误。

Invalid regular expression: /(ui[\]node_modules[\]react-native[\]. |ui[\]node_modules[\]expo[\]. |node_modules[\]react[\]dist[\]. |website\node_modules\. |heapCapture\bundle.js|. \ tests \. )$/: Range out of order in character class.无效的正则表达式:/(ui[\]node_modules[\]react-native[\]。 |ui[\]node_modules[\]expo[\]。 |node_modules[\]react[\]dist[\]。 | website\node_modules\. |heapCapture\bundle.js|. \ tests \. )$/:字符 class 中的范围乱序。

This doesn't seem to go anywhere... In other words, I am a bit stuck here since I don't know what this message actually means.这似乎不是 go 任何地方......换句话说,我有点卡在这里,因为我不知道这条消息的实际含义。

Thank you for your feedback.感谢您的反馈意见。

The team decided to extract the React Native example to a separate repository and postpone its maintenance to keep focused on more important tasks like polishing the server-side.团队决定将 React Native 示例提取到一个单独的存储库并推迟其维护,以继续专注于更重要的任务,例如完善服务器端。

As you mentioned, the example is outdated, there are many changes in the client configuration since then.正如您所提到的,该示例已过时,此后客户端配置发生了许多变化。 In the future, we may work on some guide on how to use reSolve in React Native and other frameworks.将来,我们可能会编写一些关于如何在 React Native 和其他框架中使用 reSolve 的指南。

In the meantime, you can try to add reSolve in your ReactNative app using our docs.同时,您可以尝试使用我们的文档在您的 ReactNative 应用程序中添加 reSolve。

We provide several client libraries that can be helpful: https://reimagined.github.io/resolve/docs/api/client/resolve-client/ https://reimagined.github.io/resolve/docs/api/client/resolve-react-hooks/ https://reimagined.github.io/resolve/docs/api/client/resolve-redux/ We provide several client libraries that can be helpful: https://reimagined.github.io/resolve/docs/api/client/resolve-client/ https://reimagined.github.io/resolve/docs/api/client/ resolve-react-hooks/ https://reimagined.github.io/resolve/docs/api/client/resolve-redux/

Feel free to contact us through Github in case of any difficulties, we'll be glad to help you.如有任何困难,请随时通过 Github 与我们联系,我们很乐意为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM