UNPKG

nextjs-router-events

Version:

A router events alternative for Next.js 13+ with app directory with the ability to prevent user navigation.

13 lines (12 loc) 436 B
import React from 'react'; interface FreezeRequestsContextValue { freezeRequests: string[]; setFreezeRequests: React.Dispatch<React.SetStateAction<string[]>>; } export declare const FreezeRequestsContext: React.Context<FreezeRequestsContextValue>; export declare const useFreezeRequestsContext: () => { freezeRequests: string[]; request: (sourceId: string) => void; revoke: (sourceId: string) => void; }; export {};