jsxdom creates a text node only if the children's type is string (line 5). If the type is number, it throws an error on line 12. Below is an example of this behavior.
is this the expected behavior?
Thanks.
/** @jsx JSXDOM */
var aNumber= 5;
//document.body.appendChild(<span>{aNumber}</span>); => Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
document.body.appendChild(<span>{aNumber.toString()}</span>); //works
jsxdom creates a text node only if the children's type is string (line 5). If the type is number, it throws an error on line 12. Below is an example of this behavior.
is this the expected behavior?
Thanks.