function useUserContext() {
    const context = useContext(UserContext);
    if (context === undefined) {
      throw new Error('useUserContext must be used within UserProvider');
    }
    return context;
  }
// This intentionally avoids exporting UserContext and provides just one way to provide the context value and one way to consume it
This intentionally avoids exporting UserContext and provides just one way to provide the context value and one way to consume it
This intentionally avoids exporting UserContext and provides just one way to provide the context value and one way to consume it
function useUserContext() {
    const context = useContext(UserContext);
    if (context === undefined) {
      throw new Error('useUserContext must be used within UserProvider');
    }
    return context;
  }
function useUserContext ( ) { const context = useContext ( UserContext ) ; if ( context === undefined ) { throw new Error ( 'useUserContext must be used within UserProvider' ) ; } return context ; }
This intentionally avoids exporting UserContext and provides just one way to provide the context value and one way to consume it
This intentionally avoids exporting UserContext and provides just one way to provide the context value and one way to consume it