{"id":13547929,"url":"https://github.com/andyrj/hyperapp-redux-devtools","last_synced_at":"2025-04-02T20:31:09.876Z","repository":{"id":76725552,"uuid":"95405998","full_name":"andyrj/hyperapp-redux-devtools","owner":"andyrj","description":"hyperapp HOA to utilize redux-devtools-extension from hyperapp","archived":false,"fork":false,"pushed_at":"2018-06-17T20:23:14.000Z","size":29,"stargazers_count":36,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T07:08:34.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/andyrj.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":"2017-06-26T03:42:10.000Z","updated_at":"2021-02-02T01:51:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9ab215a-c770-47a6-af89-08556aae1943","html_url":"https://github.com/andyrj/hyperapp-redux-devtools","commit_stats":{"total_commits":58,"total_committers":3,"mean_commits":"19.333333333333332","dds":"0.10344827586206895","last_synced_commit":"a5e03cd4d94b530ee81e6289998c65365e72fdf4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrj%2Fhyperapp-redux-devtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrj%2Fhyperapp-redux-devtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrj%2Fhyperapp-redux-devtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrj%2Fhyperapp-redux-devtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyrj","download_url":"https://codeload.github.com/andyrj/hyperapp-redux-devtools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246887936,"owners_count":20850168,"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-01T12:01:03.263Z","updated_at":"2025-04-02T20:31:06.870Z","avatar_url":"https://github.com/andyrj.png","language":"JavaScript","readme":"# hyperapp-redux-devtools\nhyperapp HOA (higher order app) to utilize redux-devtools-extension from hyperapp\n\n```js\nimport { h, app } from 'hyperapp';\nimport devtools from 'hyperapp-redux-devtools';\n\ndevtools(app)(\n  { count: 0 },\n  {\n    increment: () =\u003e (state) =\u003e Object.assign({}, state, { count: state.count + 1 })\n  },\n  (state, actions) =\u003e {\n    return (\n      \u003cdiv\u003e\n        \u003cbutton onclick={actions.increment}\u003eClick\u003c/button\u003e\n        \u003cspan\u003e{state.count}\u003c/span\u003e\n      \u003c/div\u003e\n    );\n  },\n  document.body\n);\n```\n\n### Dev vs. Prod\n\nWhen deploying a Hyperapp with this HOA, it is advised you don't ship the devtools bundle with it:\n\n#### With Webpack Dynamic Import\n\n```js\nimport { h, app } from 'hyperapp';\n\nlet main;\n\nif (process.env.NODE_ENV !== 'production') {\n  import('hyperapp-redux-devtools')\n    .then((devtools) =\u003e {\n      main = devtools(app)(...);\n    });\n} else {\n  main = app(...);\n}\n```\n\n#### With Conditional Require (Rollup/Gulp/etc..)\n\n```js\nimport { h, app } from 'hyperapp';\nconst devtools = process.env.NODE_ENV !== 'production'\n  ? require('hyperapp-redux-devtools')\n  : null;\n\nlet main;\n\nif (devtools) {\n  main = devtools(app)(...);\n} else {\n  main = app(...);\n}\n```\n","funding_links":[],"categories":["JavaScript","Utilities V1"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyrj%2Fhyperapp-redux-devtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyrj%2Fhyperapp-redux-devtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyrj%2Fhyperapp-redux-devtools/lists"}