DEV Community

Discussion on: React Devs, Why don't you use React Native for Web?

Collapse
 
ismaelgt profile image
Ismael González Trujillo

Mobile and web are different platforms and often we want to take advantage of this to offer different user experiences. Reusability is great, but having the ability to separate when needed is better.

NativeScript, for example, takes a different approach to code sharing.

I wrote about code reusability for cross-platform experiences (web, mobile and voice) on this article.

Collapse
 
darthknoppix profile image
Seth Corker

Good article and good points. The ability to share business logic is paramount and likely prevents the most number of bugs between versions.

I think it’s great to share certain components too but you’re right, there has to be an escape hatch where you can have separate experiences for a platform. There is no one size fits all and a platform should allow for this.

Collapse
 
evanbacon profile image
Evan Bacon • Edited

From what I can tell, the approach specified in this article is nearly identical to how React Native (for web) shares code.