proper draw cleanup
This commit is contained in:
parent
aa76419eda
commit
8f31fbe275
5 changed files with 157 additions and 154 deletions
|
|
@ -9,6 +9,7 @@ function useStrudel({
|
|||
evalOnMount = false,
|
||||
initialCode = '',
|
||||
autolink = false,
|
||||
beforeEval,
|
||||
afterEval,
|
||||
onEvalError,
|
||||
}) {
|
||||
|
|
@ -36,6 +37,7 @@ function useStrudel({
|
|||
transpiler,
|
||||
beforeEval: ({ code }) => {
|
||||
setCode(code);
|
||||
beforeEval?.();
|
||||
},
|
||||
afterEval: ({ pattern: _pattern, code }) => {
|
||||
setActiveCode(code);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue