ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

Remove React.list #102

Closed jchavarri closed 2 years ago

jchavarri commented 2 years ago

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:

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.