Skip to content


Fetches a resource and rerenders the component as the state of the resource changes.

import { useLdo, useResource, useSubject, commitData } from "@ldo/solid-react";
import React, { FunctionComponent } from "react";
import { ProfileShapeType } from "./.ldo/Profile.shapeType";

const Component: FunctionComponent = () => {
  const resource = useResource("");

  if (resource.isLoading()) {
    return <p>Loading...</p>
  return <p>{resource.uri} loaded</p>


  • uri: string - the URI of the resource
  • options: {} - Options containing the following fields
  • suppressInitialRead?: boolean - If true, this hook will not trigger a read event to fetch the document.
  • reloadOnMount?: boolean - If true, this hook will trigger a read event whenever this component mounts


A resource