{"id":16191033,"url":"https://github.com/maxmellon/hydreducer","last_synced_at":"2026-03-01T22:02:06.829Z","repository":{"id":39334442,"uuid":"217710874","full_name":"MaxMEllon/hydreducer","owner":"MaxMEllon","description":"A library is provide the reducer for Selective Hydration based on react hooks.","archived":false,"fork":false,"pushed_at":"2023-01-07T11:05:57.000Z","size":2373,"stargazers_count":4,"open_issues_count":56,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T20:44:07.265Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MaxMEllon.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}},"created_at":"2019-10-26T13:13:26.000Z","updated_at":"2023-05-28T03:32:07.000Z","dependencies_parsed_at":"2023-02-07T00:01:16.884Z","dependency_job_id":null,"html_url":"https://github.com/MaxMEllon/hydreducer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaxMEllon/hydreducer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fhydreducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fhydreducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fhydreducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fhydreducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxMEllon","download_url":"https://codeload.github.com/MaxMEllon/hydreducer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fhydreducer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29986241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T21:06:37.093Z","status":"ssl_error","status_checked_at":"2026-03-01T21:05:45.052Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-10T07:44:44.621Z","updated_at":"2026-03-01T22:02:06.814Z","avatar_url":"https://github.com/MaxMEllon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n- type-safe redux and support ducks pattern.\n\n*This module is development now*\n\n# Feature\n\n## Multi store (store instance created each module.)\n\n- Want to hydarate each by module from server.\n  - In redux case, that have to do chunking a store state, because that is a single state.\n  - That's a incompatible the state chunking and streaming rendering.\n\n## Minimum type definition\n\n- This module is providing to infer types of state, actions, and reducer.\n- You have not to do define types.\n- Just define object it.\n\n## Other\n\n- tiny\n- universal (isomorphic)\n\n# Example\n\n```typescript\nconst [actions, Provider, useAction, useModuleState] = createModule\n  .initialState({\n    count: 0\n  })\n  .actions({\n    setCount: createAction\u003cnumber\u003e(\"count/set\"),\n    increment: createAction(\"count/inc\"),\n    decrement: createAction(\"count/dec\"),\n  })\n  .reducer((actions, reducer) =\u003e (\n    reducer\n      .case(actions.setCount, (state, payload) =\u003e ({\n        ...state,\n        count: payload\n      })\n      .case(actions.increment, (state) =\u003e ({\n        ...state,\n        count: state.count + 1\n      }))\n      .case(actions.decrement, (state) =\u003e ({\n        ...state,\n        count: state.count - 1\n      }))\n  ))\n  .build()\n\n// original API (like as useDispatch + useCallback)\nconst increment = useAction(() =\u003e actions.increment())\n// like `useSelector` in react-redux\nconst count = useModuleState(state =\u003e state.count)\n```\n\n# Inspired\n\n- [typeless](https://github.com/typeless-js/typeless)\n- [typescript-fsa](https://github.com/aikoven/typescript-fsa)\n- [typescript-fsa-reducers](https://github.com/dphilipson/typescript-fsa-reducers)\n- [mobx-state-tree](https://github.com/mobxjs/mobx-state-tree)\n\n# TODO\n\n- [ ] testing\n- [ ] Promise or Rx or other anything.\n- [ ] approach to hydrate from server with React.\n\n# LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmellon%2Fhydreducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmellon%2Fhydreducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmellon%2Fhydreducer/lists"}