improve initial loading + wait before eval
This commit is contained in:
parent
d17543d5d9
commit
55c533c947
3 changed files with 13 additions and 7 deletions
|
|
@ -46,9 +46,9 @@ function useStrudel({
|
|||
drawContext,
|
||||
transpiler,
|
||||
editPattern,
|
||||
beforeEval: ({ code }) => {
|
||||
beforeEval: async ({ code }) => {
|
||||
setCode(code);
|
||||
beforeEval?.();
|
||||
await beforeEval?.();
|
||||
},
|
||||
afterEval: (res) => {
|
||||
const { pattern: _pattern, code } = res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue