@ldhop/react
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.16 • Public • Published

@ldhop/react

Follow your nose through linked data resources with React

Installation

Install the package

yarn add @ldhop/react
# or
npm install --save @ldhop/react

Install peer dependencies

yarn add react @tanstack/react-query
# or
npm install --save react @tanstack/react-query

Usage

Learn how to write a LDhop query

import { useLDhopQuery } from '@ldhop/react'

const query: RdfQuery = [
  // ... the query
]

const { isLoading, variables, quads } = useLDhopQuery({
  query, // LDhop query
  variables: useMemo(() => ({ person: [webId] }), [webId]), // starting points (memoized)
  fetch, // default or custom fetch, perhaps authenticated
})

Package Sidebar

Install

npm i @ldhop/react

Weekly Downloads

15

Version

0.0.1-alpha.16

License

MIT

Unpacked Size

13.1 kB

Total Files

8

Last publish

Collaborators

  • mrkvon