DEV Community

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

Collapse
 
sasarivera profile image
sasarivera

Hi.

If I understand correctly, the React native and react dependencies should be installed in the root node_modules to avoid having multiples version of the packages in the app.

Does this apply to every dependencies the packages share? (ex. react-native-elements)

Thanks for the guide!

Collapse
 
brunolemos profile image
Bruno Lemos • Edited

Yes, all dependencies should be installed at the root node_modules, this way it's less likely you'll face problems. Please note that this doesn't mean putting it in the root package.json -- you put the dependencies at all the packages/xxx/package.json that use this dependency.