Refactor and rename lambda in partial
This commit is contained in:
parent
5fc829efc9
commit
0d14216e9f
|
@ -166,7 +166,7 @@ export let SquigglePartial: React.FC<SquigglePartialProps> = ({
|
|||
let [expression, setExpression] = React.useState(initialSquiggleString);
|
||||
let [error, setError] = React.useState<string | null>(null);
|
||||
|
||||
React.useEffect(() => {
|
||||
let runSquiggleAndUpdateBindings = () => {
|
||||
let squiggleResult = runPartial(
|
||||
expression,
|
||||
bindings,
|
||||
|
@ -179,7 +179,9 @@ export let SquigglePartial: React.FC<SquigglePartialProps> = ({
|
|||
} else {
|
||||
setError(errorValueToString(squiggleResult.value));
|
||||
}
|
||||
}, [expression]);
|
||||
};
|
||||
|
||||
React.useEffect(runSquiggleAndUpdateBindings, [expression]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user