use-background-expo-ota-updates
v1.0.1
Published
A hook to manage Expo background and initial Over-The-Air updates
Downloads
2
Readme
use-background-expo-ota-updates 🥯
Simple, accessible hook for managing OTA updates for your expo app
Install
npm install use-background-expo-ota-updates
Usage
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>
);
}