1.0.1 • Published 4 years ago

use-background-expo-ota-updates v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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>
  );
}