UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

12 lines 462 B
import { useRouterProvider } from "./RouterProviderContext.js"; /** * Returns whether navigation blocking (useBlocker) is supported in the current context. * For react-router, this requires a data router. For other routers, it may always be true. * * @returns {boolean} Whether blocking is supported */ export const useCanBlock = () => { const provider = useRouterProvider(); return provider.useCanBlock(); }; //# sourceMappingURL=useCanBlock.js.map