UNPKG

@react-navigation/core

Version:

Core utilities for building navigators

12 lines (11 loc) 419 B
"use strict"; import * as React from 'react'; import { PreventRemoveContext } from "./PreventRemoveContext.js"; export function usePreventRemoveContext() { const value = React.useContext(PreventRemoveContext); if (value == null) { throw new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?"); } return value; } //# sourceMappingURL=usePreventRemoveContext.js.map