mirror of https://github.com/n2geoff/uhm
FIX: action delay added so state has time to update
This commit is contained in:
parent
8d88102170
commit
1e998212f2
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@n2geoff/um",
|
"name": "@n2geoff/uhm",
|
||||||
"version": "0.5.0",
|
"version": "0.6.0",
|
||||||
"exports": "./index.js",
|
"exports": "./index.js",
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"dev": "deno run --watch index.js",
|
"dev": "deno run --watch index.js",
|
||||||
|
|
|
@ -47,8 +47,8 @@ export default function app(opts) {
|
||||||
// update date from action return
|
// update date from action return
|
||||||
Object.assign(state, action(data, ...args));
|
Object.assign(state, action(data, ...args));
|
||||||
|
|
||||||
// call update
|
// delay update
|
||||||
update();
|
setTimeout(() => update(), 20);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue