UNPKG

piral-hooks-utils

Version:

Hooks and HOC for pilets and Piral instances.

12 lines 402 B
import { useContext } from 'react'; import { PiletApiProvider } from '../contexts'; /** * Retrieves the Pilet API stored in the provider. * The component must be somewhat wrapped in the * PiletApiProvider, e.g., via withPiletApi wrapper. * @returns The Pilet API for this component. */ export function usePiletApi() { return useContext(PiletApiProvider); } //# sourceMappingURL=piletApi.js.map