As part of this change, there is no need to do conversions to list:
if multiple elements have to be returned from a component, they can be wrapped with a fragment
if some component needs to process a list of children, the ... operator can be used
Besides this, React.list would lead to issues when used with cloneElement, e.g. React.cloneElement(React.list(children),...).
It was confusing to keep React.list around, so removing it should make everything clearer. This requires some changes in the signatures of React.Children functions.
After the OCaml syntax improvements were added, the "magic" that used to happen when creating elements either with a list or a single element was removed (see https://github.com/ml-in-barcelona/jsoo-react/pull/67#issuecomment-981052219).
As part of this change, there is no need to do conversions to list:
...
operator can be usedBesides this,
React.list
would lead to issues when used withcloneElement
, e.g.React.cloneElement(React.list(children),...)
.It was confusing to keep
React.list
around, so removing it should make everything clearer. This requires some changes in the signatures ofReact.Children
functions.