Closed natefaubion closed 1 year ago
I think we should try and get this in for the upcoming breaking release for PureScript 0.14.
We may not be able to get this in for 0.14 due to a backlog of other work, so I'm going to remove the label.
Fixed by #187
To be clear, I only changed it so that mempty is null and it avoids creating redundant fragments if one of the elements is also null. There isn't a reliable way of always flattening to an Array in append
, and it may not even be desirable. I think the most reliable way if it's something you want is to use reacts Children.toArray
API to flatten at the end.
React still sometimes has trouble with
[]
as mempty if you are returning it from a render method. We should usenull
asmempty
. Additionally, we should make a smarterappend
that does not build nested fragments, but instead concatenates Arrays.