DEV Community


Discussion on: Tutorial: How to share code between iOS, Android & Web using React Native, react-native-web and monorepo

brunolemos profile image
Bruno Lemos Author

I have a custom hook that checks the app dimensions and returns if it’s small/medium/large:

Besides that, make sure to always use flexbox and percentages where makes sense, not fixed widths in pixels.

ziaulrehman40 profile image
Zia Ul Rehman

Yeah similar approach with HOC for class components. I actually just released a small RN component for this(actually my first npm package).

Forem Open with the Forem app