You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I increment above the value 0 and then decrement to -1 then it will give me the error: Uncaught TypeError: Node.removeChild: Argument 1 is not an object. It also gives an error if I decrement below 0 and then try to increment to 1. The fix is to change <span>{count}</span to <span>{String(count)}</span>. This behaviour differs from the hyperscript. The following hyperscript has no problems: h("span", null, count). Also the vnode generated shows that the span with a zero has children: {"sel":"span","data":{},"children":[{"text":0}],"text":0} whereas a span with a 1 has: {"sel":"span","data":{},"text":1}
The text was updated successfully, but these errors were encountered:
Simple counter application:
If I increment above the value 0 and then decrement to -1 then it will give me the error: Uncaught TypeError: Node.removeChild: Argument 1 is not an object. It also gives an error if I decrement below 0 and then try to increment to 1. The fix is to change
<span>{count}</span
to<span>{String(count)}</span>
. This behaviour differs from the hyperscript. The following hyperscript has no problems:h("span", null, count)
. Also the vnode generated shows that the span with a zero has children:{"sel":"span","data":{},"children":[{"text":0}],"text":0}
whereas a span with a 1 has:{"sel":"span","data":{},"text":1}
The text was updated successfully, but these errors were encountered: