Search code examples
javascriptreactjsreact-nativereact-dom

What's the main difference between react-native and react-dom


I was checking out the React Native website then I realized you can build web apps with React Native as well as Android/iOS apps. I was wondering what's the main difference between react-dom and React Native if both of these libraries can build web apps and manipulate the DOM. What are the main features react-dom has which React Native doesn't?


Solution

  • You can't actually build web apps with React Native. You can use react-native-web for that, which implements React Native APIs on top of react-dom and browser APIs, but is not the same thing as React Native and doesn't use React Native.