Simply import the package in your js file and you will see a propmt asking you to install the dependency. Click on the Add dependency link and it will automatically add the package to your package.json.
You can read more about this at Expo Snack Documentation
Answer from nithinpp on Stack OverflowVideos
react native - How to add add new packages in expo snack? - Stack Overflow
React Native Example App does not run in Expo Snack - Stack Overflow
Are there any alternatives to Snack for creating an Expo/React native app demo?
That's because the firebase SDK contains native code probably. If you want to create a snack it has to be Expo Go compatible
More on reddit.comSnap Expo thoughts?
So basically Iโm pretty new to programming and very new to app creation. What Iโm looking to accomplish is the following:
build an app using React Native.
be able to showcase that app off to potential employers.
To accomplish this, I figure Expo comes in at some point, since I currently have downloaded the Expo Go app and do see the code Iโve written on my computer reflected in the app. This seems all good so far, but I donโt think I quite understand how I can share this work with others. From what I understand, Expo Go will only show the work from your computerโs code if youโre on the same network and have synced up the two via a QR code (Iโm currently not on the same network as my code/computer and tried to open my project in Expo Go, to no avail).
Is there a workaround/better way to do this? Basically I want my app to be shareable so that other non-developers can see/use/test it, including uploading their own pictures, etc into the app. Is this possible and, if so, can Expo or any of its tools come into play in this process?
Simply import the package in your js file and you will see a propmt asking you to install the dependency. Click on the Add dependency link and it will automatically add the package to your package.json.
You can read more about this at Expo Snack Documentation
If anyone is still confused in 2024, you should add a package directly to the package.json file and just save that file. It will run npm install.
And there is a list of available packages that snack supports which is frequently updated. So not all packages are supported.
https://forums.expo.dev/t/modules-available-in-snack/1651