Hi there!
I’m new to Reason/ML… please bear with me.
I have this type:
type record = {
id_: int,
subject: option(string),
}
Later in a React component, I’m trying to read out the string value from record.subject:
<li key=(string_of_int(record.id_))>
(
switch (record.subject) {
| None => <div> (React.stringToElement("foo")) </div>
| string(s) => <div> (React.stringToElement(s)) </div>
}
)
</li>
Unfortunately this doesn’t work. I keep getting unknown syntax errors. I think there’s something wrong with string(s)… I guess it’s something really basic I’m missing here. Could someone please point me to the right direction? 

