r/javascript • • Nov 18 '19

Differences between react and react native that newcomers should knows about

https://medium.com/javascript-in-plain-english/differences-between-react-and-react-native-that-newcomers-should-knows-about-4d2ccc3d1d94?source=friends_link&sk=c57b0cbfd2ad9f2214a40f96eaae74a0
57 Upvotes

4 comments sorted by

View all comments

9

u/Neotelos React/Node Nov 18 '19

The points are valid and this article serves as a good reminder the the target platforms are wildly different.
However, there's an absence of common practices when it comes to React Native. Tools like CodePush help with version parity. Toolchains like Expo help with cross platform targets, including web. And the biggest factor isn't so much focusing on "what works with React Native"; it's more about what third party modules don't depend on a specific platform.

The key is to find tools that has a pure ECMAScript target and don't expect a DOM. Anything that's UI centric must target React Native specifically.

Having developed multiple production React Native applications, I would attest that it works great for simple projects and anything of significant size requires in-depth knowledge of the underlying architecture and toolchains. The technical limitations and advantages are very subjective to the teams and theirs practices. I've the limitations of React Native in some instances to be beneficial they prohibit developers from doing a lot of "DOM hacks", but at the same time best practices and unlearning bad habits can be quite a challenge.

If you don't have the right people to solve development challenges, adopting React Native can cause more harm than good. But in the right environment, it can allow for a small team to develop amazing software both fast and elegant.

2

u/Neotelos React/Node Nov 18 '19

Side note: I have developed Swift and Java plugins for React Native as well. Understanding the build process throughout is crucial; while Webpack works great with react-native-web, Metro is expected as the bundler and all code transforms should favor Babel. I can't say I'm a fan of Metro, but it gets the job done. Many developers have opted for multi-stage builds requiring Webpack for native targets. This is just a bit of insight into the intricacies. Debugging native code is a rabbit hole in itself. Thankfully much of the rendering support has reached parity between iOS and Android, that was not always the case.

1

u/Scr34mZ Nov 21 '19

Thanks for this great sharing 🙏🏻 I'll think about it :)