mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-11-15 17:21:38 +03:00
B: Stabilize function object
This commit is contained in:
parent
72fad33a07
commit
2e085ccb87
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { useRef, useState } from 'react';
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
import { type ReactCodeMirrorRef } from '@uiw/react-codemirror';
|
||||
|
||||
|
|
@ -71,10 +71,11 @@ export function EditorRSExpression({
|
|||
|
||||
const { checkConstituenta: checkInternal, isPending } = useCheckConstituenta();
|
||||
|
||||
useResetOnChange([activeCst, toggleReset], () => {
|
||||
const resetCallback = useCallback(() => {
|
||||
setIsModified(false);
|
||||
setParseData(null);
|
||||
});
|
||||
}, []);
|
||||
useResetOnChange([activeCst, toggleReset], resetCallback);
|
||||
|
||||
function checkConstituenta(
|
||||
expression: string,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user