add patterns tab with examples

This commit is contained in:
Felix Roos 2023-08-23 22:51:36 +02:00
parent 4e7e715f10
commit 1855dae35e
4 changed files with 40 additions and 11 deletions

View file

@ -73,8 +73,11 @@ function useStrudel({
}
});
const activateCode = useCallback(
async (autostart = true) => {
const res = await evaluate(code, autostart);
async (newCode, autostart = true) => {
if (newCode) {
setCode(code);
}
const res = await evaluate(newCode || code, autostart);
broadcast({ type: 'start', from: id });
return res;
},