UNPKG

@react-navigation/core

Version:

Core utilities for building navigators

12 lines (11 loc) 562 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. This is likely a bug in the navigator.\n\nIf you're using a custom navigator, make sure that the navigator content is wrapped by the 'render' function returned by 'useNavigationBuilder'."); } return value; } //# sourceMappingURL=usePreventRemoveContext.js.map