{"id":13671121,"url":"https://github.com/tjdavies/hyper-redux","last_synced_at":"2025-04-27T14:33:05.927Z","repository":{"id":143799357,"uuid":"129404093","full_name":"tjdavies/hyper-redux","owner":"tjdavies","description":"hyper app style redux react","archived":false,"fork":false,"pushed_at":"2018-10-17T09:39:43.000Z","size":11,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T17:02:36.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/tjdavies.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}},"created_at":"2018-04-13T13:11:11.000Z","updated_at":"2019-09-07T02:32:16.000Z","dependencies_parsed_at":"2023-05-03T13:45:51.988Z","dependency_job_id":null,"html_url":"https://github.com/tjdavies/hyper-redux","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/tjdavies%2Fhyper-redux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjdavies%2Fhyper-redux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjdavies%2Fhyper-redux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjdavies%2Fhyper-redux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjdavies","download_url":"https://codeload.github.com/tjdavies/hyper-redux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154297,"owners_count":21544476,"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":[],"created_at":"2024-08-02T09:00:59.994Z","updated_at":"2025-04-27T14:33:05.622Z","avatar_url":"https://github.com/tjdavies.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## hyper-redux\n\nHyperApp style redux\n\nFor those who need to use react and redux but want something simple\n\n- No more switch statments or action objects\n- Fully supports redux debugger with time travel ect.\n- Can be strongly typed with TypeScript\n- Can use context to access state and actions in nested components\n\n## Install\n\n```sh\n  npm install hyper-redux\n```\n## Example\n\n```js\nimport * as React from 'react';\nimport { app } from 'hyper-redux';\n\nconst initalState: 0;\n\nconst actionsMap = {\n  increment: delta =\u003e state =\u003e state + delta,\n  decrement: delta =\u003e state =\u003e state - delta,\n  incrementDelayed: delta =\u003e (state, actions) =\u003e {\n    setTimeout(actions.increment, 1000, delta);\n    return state;\n  }\n};\n\nfunction view(state, actions ) {\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003e Clicked: {state} times \u003c/p\u003e\n      \u003cbutton onClick={() =\u003e actions.increment(1)}\u003e+\u003c/button\u003e\n      \u003cbutton onClick={() =\u003e actions.decrement(1)}\u003e-\u003c/button\u003e\n      \u003cbutton onClick={() =\u003e actions.incrementDelayed(1)}\u003e+ delayed\u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n\napp(initalState, actionsMap, view, document.body);\n```\n\n## Live Demo\n\n[![Edit hyper-redux example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/745pqpnoz6)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjdavies%2Fhyper-redux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjdavies%2Fhyper-redux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjdavies%2Fhyper-redux/lists"}