Today I Learned

A Hashrocket project

Render a list of jsx elements with ReasonReact

In javascript/jsx I can just create a list of jsx elements and place that list into the jsx.

const thingDivs = => (

return (<div>

But ReasonReact expects the variable to be of type ReasonReact.reactElement, and so we have to convert the list of jsx nodes we create to an element with the function ReasonReact.array.

let thingDivs = => 
, things)

<div className="parentContainer">

ReasonReact.array returns a value of type ReasonReact.reactElement.