This is an example of integrating https://github.com/react-native-google-cast/react-native-google-cast in Expo 51.
This example was created using the following steps:
-
npx create-expo-app@latest --template blank-typescript
-
cd RNGCExpo
-
npm i react-native-google-cast
-
npx expo install expo-build-properties expo-dev-client
-
Add to
app.json
:{ "expo": { "plugins": [ "react-native-google-cast", ["expo-build-properties", { "ios": { "deploymentTarget": "14.0" } }] ] } }
-
Add to
App.tsx
import { CastButton, useCastState } from "react-native-google-cast"; <CastButton style={{ tintColor: "black", height: 48, width: 48 }} />;
-
npm run android
ornpm run ios
to build and run the app.