Simple, accessible hook for managing OTA updates for your expo app
npm install use-background-expo-ota-updates
import { useBackgroundExpoOTAUpdates } from "use-background-expo-ota-updates";
export default function App() {
const [updateReady, reloadToApply] = useBackgroundExpoOTAUpdates({
checkForUpdateOnLaunch: true,
});
useEffect(() => {
if (updateReady) {
/**
* Your logic
*/
reloadToApply(); // Whenever you are ready
}
}, [updateReady]);
return (
<View>
{/* <Component /> */}
</View>
);
}