{"id":20762842,"url":"https://github.com/astrocoders/reason-epitath","last_synced_at":"2025-06-16T03:40:25.211Z","repository":{"id":98965636,"uuid":"152698949","full_name":"Astrocoders/reason-epitath","owner":"Astrocoders","description":"CPS sugar usage for React Render Props composition in ReasonML","archived":false,"fork":false,"pushed_at":"2018-11-28T16:48:02.000Z","size":161,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T07:08:53.946Z","etag":null,"topics":["react","reasonml","render-props"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Astrocoders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-12T05:35:20.000Z","updated_at":"2024-06-04T21:30:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e775b3c0-2090-4251-857f-3201a947ba5d","html_url":"https://github.com/Astrocoders/reason-epitath","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrocoders%2Freason-epitath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrocoders%2Freason-epitath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrocoders%2Freason-epitath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrocoders%2Freason-epitath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrocoders","download_url":"https://codeload.github.com/Astrocoders/reason-epitath/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658212,"owners_count":21622822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","reasonml","render-props"],"created_at":"2024-11-17T10:39:32.346Z","updated_at":"2025-04-30T07:08:59.685Z","avatar_url":"https://github.com/Astrocoders.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## bs-epitath demo\n\nRead the article https://medium.com/astrocoders/render-props-composition-for-reasonml-is-here-b9c004ca9fcb\n\n## Running\n\n```\nnpm install\n```\n\n```\nnpm start\n```\n\n\n```reason\nmodule StateConfig = {\n  type state = string;\n};\n/* ReContainers is from https://github.com/Astrocoders/recontainers/ */\nmodule State = ReContainers.WithState.Make(StateConfig);\n\nlet component = ReasonReact.statelessComponent(\"App\");\n\nlet make = _children =\u003e {\n  ...component,\n  render: _self =\u003e {\n    let%Epitath emailState = children =\u003e\n      \u003cState initialState=\"\"\u003e ...children \u003c/State\u003e;\n\n    \u003cdiv\u003e\n      \u003ch1\u003e {ReasonReact.string(\"Meet Epitath\")} \u003c/h1\u003e\n      \u003clabel\u003e {ReasonReact.string(\"Email\")} \u003c/label\u003e\n      \u003cinput\n        onChange={\n          event =\u003e\n            emailState.send(Set(ReactEvent.Form.target(event)##value))\n        }\n      /\u003e\n      \u003cp\u003e {ReasonReact.string(emailState.state)} \u003c/p\u003e\n      {\n        /* Combine as many as you want. Use even in the middle of JSX! */\n\n        let%Epitath passwordState = children =\u003e\n          \u003cState initialState=\"\"\u003e ...children \u003c/State\u003e;\n\n        \u003c\u003e\n          \u003clabel\u003e {ReasonReact.string(\"Password\")} \u003c/label\u003e\n          \u003cinput\n            onChange={\n              event =\u003e\n                passwordState.send(\n                  Set(ReactEvent.Form.target(event)##value),\n                )\n            }\n          /\u003e\n          \u003cp\u003e {ReasonReact.string(passwordState.state)} \u003c/p\u003e\n        \u003c/\u003e;\n      }\n    \u003c/div\u003e;\n  },\n};\n```\n\n# Next Steps\n\nMaybe change\n```reason\nlet%Epitath passwordState = children =\u003e\n  \u003cState initialState=\"\"\u003e ...children \u003c/State\u003e;\n```\n\nto \n```reason\nlet%Epitath passwordState = \u003cState initialState=\"\" /\u003e;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrocoders%2Freason-epitath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrocoders%2Freason-epitath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrocoders%2Freason-epitath/lists"}