为什么我的代码不能在 web 中的 react-native 代码中运行 [英] why my code not run in react-native code in web

查看:32
本文介绍了为什么我的代码不能在 web 中的 react-native 代码中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 Android 和 iOS 上完美运行的 react-native 项目,我知道 react-native 应用程序可以在移动平台和 Web 平台上运行.那么我如何才能在 Web 上运行我当前的代码,或者如何将当前的移动应用程序转换为 Web 应用程序.

I have a react-native project which is running in Android and iOS perfectly, I know that a react-native app can run on both platform Mobile and Web. So how can I run my current code on Web or how can I convert the current mobile app to the web app.

我已经安装了 react-dom、react-native-web,但没有任何成功.

I have already installed react-dom, react-native-web but I am not getting any success.

推荐答案

你是从哪里了解到 React Native 运行 Web 应用的?

Where did you read that React Native runs Web Apps?

React Native 是一个仅用于构建移动应用的框架.

React Native is a framework that only is used to build Mobile Apps.

您可能将 React Native 与 ReactJS 混淆了.

Probably you are confusing React Native with ReactJS.

这里留给你什么是React JS以及如何开始,它和React Native非常相似,如果你使用React Native就不会那么难理解了.

I leave you here what is React JS and how to get started, it is so similar to React Native, it won't be so difficult to understand for you if you use React Native.

https://reactjs.org/

这篇关于为什么我的代码不能在 web 中的 react-native 代码中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆