Well, this might be a silly question but I want to clarify the reason. React-Native imports nodeJS libraries, so I think it is possible to use reactJS library as well though reactJS includes pure html components.
Can react native recognize reactJS components including html?
React Native is one of many JavaScript programming environments, including Node. js, web browsers, Electron, and more, and npm includes libraries that work for all of these environments.
One of the remarkable facts about React-Native is that it's not only about building Native IOS/Android apps, but we can also build web applications using the same code and share more than 50% of codes between React-Native(Mobile) and React(Web) because we use React and JavaScript in both cases.
So any front-end packages that are supposed to use HTML and be displayed in browser will not work. On the other hand, any modules that are pure javascript and run within node. js/io. js are perfectly OK to be run in react-native.
react
library actually does not have anything related to Browser DOM HTML. Anything related to it separated into react-dom
package. React Native does not and cannot use this library, because you don't have DOM underneath a react native application. However you can use most of the code/functionality you wrote for your mobile app in the browser, if you install necessary transpiling library. This is possible because react native defines some primitive components that can be ported to almost any platform.
If you still want to use just HTML to render inside react native, you may use WebView
for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With