DEV Community

Discussion on: React Native Web platform specific web.js extension

Collapse
 
gorbypark profile image
Mike Hamilton • Edited

I've found that I don't use iOS or Android specific files very much, as any minor differences can be handled using if (Platform.OS === "ios") { ... } within the same file. However, when making a multi-platform app that targets phones (small screens) and the web (sometimes big screens), there are so many differences that it's easier to have separate files rather than dozens of if statements that make the code hard to follow.