Skip to content

Instantly share code, notes, and snippets.

@Denommus
Created October 18, 2017 19:38
Show Gist options
  • Save Denommus/4c14c06bc3cc15f2e069cf276b22acf1 to your computer and use it in GitHub Desktop.
Save Denommus/4c14c06bc3cc15f2e069cf276b22acf1 to your computer and use it in GitHub Desktop.
module type COMPONENT = {
type t;
let name: string;
let vdomS: signal t => signal ReasonReact.reactElement;
};
module GenerateComponent (C: COMPONENT with type t = unit) => {
let component = ReasonReact.reducerComponent C.name;
let make _children => componentFromSignal component () C.vdomS;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment