improve initial loading + wait before eval

This commit is contained in:
Felix Roos 2023-03-23 21:56:20 +01:00
parent d17543d5d9
commit 55c533c947
3 changed files with 13 additions and 7 deletions

View file

@ -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;