@silicon.js/app-updates
Version:
lightweight react package for checking app updates from ios app store and android play store using react context
12 lines (9 loc) • 368 B
text/typescript
import { useContext } from 'react';
import AppUpdatesContext, { AppUpdatesContextType } from '../provider/AppUpdatesContext';
export const useAppUpdatesContext = (): AppUpdatesContextType => {
const context = useContext(AppUpdatesContext);
if (!context) {
throw new Error('useAppUpdatesContext must be used within an AppUpdatesProvider');
}
return context;
};