Skip to content

Instantly share code, notes, and snippets.

@peterpme
Created December 13, 2018 15:55
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 peterpme/177956aed4f112f63fc806cc2206ab46 to your computer and use it in GitHub Desktop.
Save peterpme/177956aed4f112f63fc806cc2206ab46 to your computer and use it in GitHub Desktop.
ReasonReact render props
[@genType]
let make = (~render, ~children) => {
...component,
render: _self =>
<div className="InteriorLayout">
{render()}
</div>,
};
[@genType]
let make = (~match_, ~history, ~images, _children) => {
...component,
render: _self =>
<InteriorLayout render={<div />}>
<InteriorLayoutSidebar title="Assets" links />
<InteriorLayoutHeader mode=TitleOnly title="Images" />
</InteriorLayout>
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment