Which NPM packages work with Expo

Hi - Im new to RN and deciding whether to switch to Expo.
The deal maker/breaker for me is to know how npm modules interact with Expo. E.g. Ive learned that react-native-vector-icons work OK with Expo (by trawling various forums) but dont know about react-native-google-places (which I need for my app).
My specific questions are:
Do all npm packages work with expo in their vanilla form, or do special versions need to be developed? (e.g. react-native-google-places-expo).
Assuming some npm packages dont work, why do some work OK as they are but othes dont?
Is there a list somewhere that details which packages work and which dont?

Thanks in advance for any help

Hey there @jamesdmurphy51 - you can use any npm package with Expo if it works with RN, but you may need to detach in order to do so. Any npm packages which include native iOS or Android code will not work with Expo out of the box, unfortunately. This is because all of the native code is precompiled with Expo, so that arbitrary JS bundles can be loaded without needing to build & compile a separate app each time.

A good rule of thumb is that if an npm package requires you to react-native link as part of the install process, it will not work with vanilla Expo, and you’ll need to detach in order to use it in an Expo app.

On the other hand, packages like lodash and redux that are pure JS can be used just fine with Expo out of the box.

Hope that helps! Let me know if you have any other questions or need more clarification.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.