Skip to content

Instantly share code, notes, and snippets.

@dwwoelfel
Last active October 27, 2017 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwwoelfel/57d16458f708f3ab594796f370070cd3 to your computer and use it in GitHub Desktop.
Save dwwoelfel/57d16458f708f3ab594796f370070cd3 to your computer and use it in GitHub Desktop.
external commentItem : ReasonReact.reactClass = "./CommentItem" [@@bs.module];
let make ::_type ::id ::user ::timeAgo ::content children =>
ReasonReact.wrapJsForReason
reactClass::commentItem
props::{"type": _type, "id": id, "user": user, "timeAgo": timeAgo, "content": content}
children;
let component = ReasonReact.statelessComponent "CommentRe";
let make _children => {
...component,
render: fun self => <div> <CommentItemRe _type="" id="" user="" timeAgo="" content="" /> </div>
};
let default = ReasonReact.wrapReasonForJs ::component (fun jsProps => make [||]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment