I want to use expo-av package in expo snack. However I know that after importing expo-av at App.js file. I have to add the expo-av at package.json file.

But I want to use packages like this one, in the App.js file without manually typing the version on package.json file.

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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With