{"id":17680695,"url":"https://github.com/elbywan/rescript-hyperactiv","last_synced_at":"2026-03-19T01:46:05.249Z","repository":{"id":152588046,"uuid":"413027014","full_name":"elbywan/rescript-hyperactiv","owner":"elbywan","description":"Hyperactiv bindings for ReScript","archived":false,"fork":false,"pushed_at":"2021-10-03T16:45:14.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T21:35:56.862Z","etag":null,"topics":["hyperactiv","reactive","rescript","rescript-bindings"],"latest_commit_sha":null,"homepage":"","language":"ReScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elbywan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-10-03T09:04:35.000Z","updated_at":"2023-03-17T11:11:59.000Z","dependencies_parsed_at":"2023-07-13T22:46:19.752Z","dependency_job_id":null,"html_url":"https://github.com/elbywan/rescript-hyperactiv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbywan%2Frescript-hyperactiv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbywan%2Frescript-hyperactiv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbywan%2Frescript-hyperactiv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbywan%2Frescript-hyperactiv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elbywan","download_url":"https://codeload.github.com/elbywan/rescript-hyperactiv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365645,"owners_count":20765546,"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":["hyperactiv","reactive","rescript","rescript-bindings"],"created_at":"2024-10-24T09:08:38.454Z","updated_at":"2026-02-09T12:02:13.505Z","avatar_url":"https://github.com/elbywan.png","language":"ReScript","readme":"# ⚡️🔗 [Hyperactiv](https://github.com/elbywan/hyperactiv) bindings for [ReScript](https://rescript-lang.org/)\n\n## Installation\n\n```sh\nnpm i rescript-hyperactiv\n```\n\n## Usage\n\n```rescript\ntype store = {mutable counter: int}\n\nlet logHandler = Hyperactiv.Handlers.debugger(%raw(\"console\"))\n\nlet store = {\n  open Hyperactiv\n  let storeRef = React.makeStore({counter: 0})\n  let store = storeRef-\u003eunwrap\n  computed(() =\u003e {\n    store.counter = store.counter \u003e 0 ? store.counter + 1 : store.counter\n  })-\u003eignore\n  Handlers.set(storeRef, logHandler)\n  store\n}\n\nlet classStore = {\n  open Hyperactiv.Classes\n  let storeRef = make({counter: 0})\n  storeRef-\u003ecomputed(@this this =\u003e this.counter = this.counter * 2)\n  storeRef-\u003eonChange(logHandler)\n  storeRef-\u003eunwrap\n}\n\nmodule Root = {\n  @react.component\n  let make = Hyperactiv.React.watch(() =\u003e {\n    \u003c\u003e\n      \u003ch1\u003e {React.int(store.counter)} \u003c/h1\u003e\n      \u003ch2\u003e {React.int(classStore.counter)} \u003c/h2\u003e\n      \u003cbutton\n        onClick={_ =\u003e {\n          store.counter = store.counter + 1\n          classStore.counter = classStore.counter + 1\n        }}\u003e\n        {React.string(\"Click me\")}\n      \u003c/button\u003e\n    \u003c/\u003e\n  })\n}\n\nswitch ReactDOM.querySelector(\"#root\") {\n| Some(root) =\u003e ReactDOM.render(\u003cRoot /\u003e, root)\n| None =\u003e ()\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felbywan%2Frescript-hyperactiv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felbywan%2Frescript-hyperactiv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felbywan%2Frescript-hyperactiv/lists"}