Hi,
I am trying to convert a ReasonReact.wrapJsForReason to JSX:3.
This was the old:
[@bs.module "./GraphDownloadButtons"] external graphDownloadButtons: ReasonReact.reactClass = "default";
let make = (~graphType=?, ~graph: graphRef, ~filenames, ~downloadOptions, children) =>
ReasonReact.wrapJsForReason(
~reactClass=graphDownloadButtons,
~props={
"graphType": Js.Nullable.fromOption(graphType),
"graph":
switch (graph) {
| ReactRef(v) => Obj.magic(v)
| DomRef(v) => Obj.magic(v)
},
"filenames": Js.Dict.fromList(filenames),
"downloadOptions": Js.Dict.fromList(downloadOptions),
},
children,
);
And here is the new:
[@bs.module “./GraphDownloadButtons”][@react.component]
external make: (~graphType=?, ~graph: graphRef, ~filenames, ~downloadOptions, children) => React.element = “default”;
React.element is throwing me an Error: Syntax error but unsure why.
I have successfully updated other ReasonReact.wrapJsForReason, but this one is giving the syntax error.
Thanks in advance for any insights.
Also as an aside, how come there is no ReasonReact topic to select, or should I be posting these types of questions elsewhere?
