Iterate through array in reason react



How do you loop through an array of items in reason react… A small demo/ gist would be nice, Thanks


This doesn’t seem to work

                step =>
                  <Step key=step.label>
                    <Steplabel> (ReasonReact.string(step.label)) </Steplabel>

Im receiving the props from a js file as an array


There is ReasonReact.arrayToElement to convert an array to a React element. In the latest version of ReasonReact, it’s been renamed to ReasonReact.array.

Here’s an example.