Braces vs. parentheses in ReasonReact to interpolate strings

reasonreact

#1

In the documentation for ReasonReact (for example, https://reasonml.github.io/reason-react/docs/en/intro-example ), you see code like this using braces:

render: (_self) => <button> {ReasonReact.string("Hello " ++ name ++ "!")} </button>

However, the template file for a react project has code like this with parentheses:

      <button onClick=(_event => self.send(Click))>
        (ReasonReact.string(message))
      </button>

Which is the preferred method, and if it is braces, should the template be changed to match?


#2

It seems to me that the new versions of refmt use braces, and that the old versions use parentheses.