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
Hello! Just so this issue is noted somewhere, but using a match case for JSX.create children returns a faulty output:
Note
This was tested with Fable v5.0.0-alpha.14
[<ReactComponent(true)>]letTestComponent()=letcounter,setCounter = React.useState(0)
Fable.Core.JSX.create "ul"["children"==>[match counter with|0-> Html.li "No items!"| items ->for i in1..items do
Html.li [
prop.key i
prop.text (sprintf "Item %d" i)]]]
and the output will be:
exportfunctionTestComponent(){constpatternInput=useState(0);constsetCounter=patternInput[1];constcounter=patternInput[0]|0;return<ul>{()=>{// this lambda function call creates the errorif(counter===0){returnsingleton(<li>
No items!
</li>);}else{constitems=counter|0;returnmap((i)=><likey={i}>{toText(printf("Item %d"))(i)}</li>,rangeDouble(1,1,items));}}}</ul>;}
if we check the console we can find the following message:
Hello! Just so this issue is noted somewhere, but using a match case for
JSX.createchildren returns a faulty output:Note
This was tested with Fable v5.0.0-alpha.14
and the output will be:
if we check the console we can find the following message: