Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -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) {
Expand Down