Skip to content

Commit

Permalink
emmm
Browse files Browse the repository at this point in the history
  • Loading branch information
yisar committed Oct 18, 2023
1 parent 828ac36 commit 618047c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const isNonEmptyArray = (c) => Array.isArray(c) && c.length > 0
const isLeaf = (c) => typeof c === "string" || typeof c === "number"
const isElement = (c) => c?.vtype === VTYPE_ELEMENT
const isComponent = (c) => c?.vtype === VTYPE_FUNCTION
const defer = cb => Promise.resolve().then(cb)

function h(type, props, ...children) {
props = props || {}
Expand Down Expand Up @@ -435,7 +436,7 @@ const useReducer = (
if (hook[0] !== v) {
hook[0] = v
c.dirty = true
requestAnimationFrame(() => render(c, rootRef))
defer(() => render(c, rootRef))
}
}
}
Expand Down

0 comments on commit 618047c

Please sign in to comment.