useResource | @tomic

Function useResource

  • useResource(subject?: string, opts?: FetchOpts): Resource
  • Hook for getting a Resource in a React component. Will try to fetch the subject and add its parsed values to the store.

    Parameters

    • subject: string = unknownSubject
    • Optional opts: FetchOpts

    Returns Resource