diff --git a/lib/index.js b/lib/index.js index 6e3fdd2..6e0150c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -212,7 +212,6 @@ export async function MarkdownAsync(options) { * React node. */ export function MarkdownHooks(options) { - const processor = createProcessor(options) const [error, setError] = useState( /** @type {Error | undefined} */ (undefined) ) @@ -221,6 +220,7 @@ export function MarkdownHooks(options) { useEffect( function () { let cancelled = false + const processor = createProcessor(options) const file = createFile(options) processor.run(processor.parse(file), file, function (error, tree) {