React 16 will allow to return arrays (or maybe even more general iterators) from within render method. We can have a few choices how to support that.
- using variants in render codomain
- or adding a function of type
wrap :: Array ReactElement -> ReactElement which would be just unsafeCoerce
The second choice would easier to adopt in existing projects, the first one would break a lot of classes. We could add a new type to avoid that though.
React 16 will allow to return arrays (or maybe even more general iterators) from within render method. We can have a few choices how to support that.
wrap :: Array ReactElement -> ReactElementwhich would be justunsafeCoerceThe second choice would easier to adopt in existing projects, the first one would break a lot of classes. We could add a new type to avoid that though.