diff --git a/src/components/httproute/HTTPRouteCreatePage.tsx b/src/components/httproute/HTTPRouteCreatePage.tsx index 4c304173..ec7c9dc9 100644 --- a/src/components/httproute/HTTPRouteCreatePage.tsx +++ b/src/components/httproute/HTTPRouteCreatePage.tsx @@ -350,7 +350,10 @@ const HTTPRouteCreatePage: React.FC = ({ onFormChange }; const onFormChangeRef = React.useRef(onFormChange); - onFormChangeRef.current = onFormChange; + + React.useEffect(() => { + onFormChangeRef.current = onFormChange; + }, [onFormChange]); React.useEffect(() => { if (onFormChangeRef.current) {