import { useMemo } from "react";
import { renderNast } from "../helpers/nast.js";
/** A hook to get the rendered output of a nostr syntax tree */
export function useRenderNast(root, components) {
    return useMemo(() => (root ? renderNast(root, components) : null), [root, Object.keys(components).join("|")]);
}
