function MarkdownHooks(options) {
  const processor = useMemo(
    function () {
      return createProcessor(options)
    },
    [options.rehypePlugins, options.remarkPlugins, options.remarkRehypeOptions]
  )
  const [error, setError] = useState(
    /** @type {Error | undefined} */ (undefined)
  )
  const [tree, setTree] = useState(/** @type {Root | undefined} */ (undefined))

  useEffect(
    function () {
      let cancelled = false
      const file = createFile(options)

      processor.run(processor.parse(file), file, function (error, tree) {
        if (!cancelled) {
          setError(error)
          setTree(tree)
        }
      })

      /**
       * @returns {undefined}
       *   Nothing.
       */
      return function () {
        cancelled = true
      }
    },
    [options.children, processor]
  )

  if (error) throw error

  return tree ? post(tree, options) : options.fallback
}
Component to render markdown with support for async plugins through hooks.

This uses `useEffect` and `useState` hooks.
Hooks run on the client and do not immediately render something.
For async support on the server,
see {@linkcode MarkdownAsync}.

@param {Readonly<HooksOptions>} options
  Props.
@returns {ReactNode}
  React node.