FIX: action delay added so state has time to update

This commit is contained in:
Geoff Doty 2025-05-14 17:10:34 -04:00
parent 8d88102170
commit 1e998212f2
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@n2geoff/um",
"version": "0.5.0",
"name": "@n2geoff/uhm",
"version": "0.6.0",
"exports": "./index.js",
"tasks": {
"dev": "deno run --watch index.js",

View File

@ -47,8 +47,8 @@ export default function app(opts) {
// update date from action return
Object.assign(state, action(data, ...args));
// call update
update();
// delay update
setTimeout(() => update(), 20);
};
}
});