问题
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.
I have already installed react-dom, react-native-web but I am not getting any success.
回答1:
Where did you read that React Native runs Web Apps?
React Native is a framework that only is used to build Mobile Apps.
Probably you are confusing React Native with ReactJS.
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/
来源:https://stackoverflow.com/questions/57413989/why-my-code-not-run-in-react-native-code-in-web