@nosto/nosto-react
Version:
Component library to simply implementing Nosto on React.
12 lines (10 loc) • 341 B
text/typescript
import { useContext } from "react"
import { NostoContext, NostoContextType } from "../context"
/**
* A hook that allows you to access the NostoContext and retrieve Nosto-related data from it in React components.
*
* @group Essential Functions
*/
export function useNostoContext(): NostoContextType {
return useContext(NostoContext)
}