DEV Community

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

Collapse
 
fasterpancakes profile image
Cameron Moss

Between web and iOS they are almost visually the same and that was our intent. As for Android, we don't share any components there yet. I would imagine the few differences could be handled easily with RN Platform.

I forgot to mention that a lot of people don't consider how dropdowns as they work in the web don't offer the best mobile experience. Having a shared component library with the option to define different components for web and native that use different UI libraries was invaluable. For example, we really wanted to use react-select for web and built something custom for native using the same props interface.

Thread Thread
 
darthknoppix profile image
Seth Corker

That’s a great point. Different paradigms exist for different platforms. I think drop downs are a component which can vary a lot depending on platform, mouse or touch, etc.

I think I whenever there is a shared code platform there needs to be a way to target specific platforms or features. iOS, Android and web have very different ideas of what a stop down should look like and how it should behave - to deliver the same experience to every platform could be very out of place.

Thread Thread
 
evanbacon profile image
Evan Bacon

The ability to target different platforms is a part of Expo for web, (it's added in the expo/webpack-config). You can use a .web.js extension to target web just like .ios, .android, .native target their own respective platforms.