{"id":15554135,"url":"https://github.com/afeiship/next-react-active-state","last_synced_at":"2026-04-16T12:38:49.506Z","repository":{"id":57122821,"uuid":"248758370","full_name":"afeiship/next-react-active-state","owner":"afeiship","description":"Active state special for react based on next-active-state.","archived":false,"fork":false,"pushed_at":"2021-09-07T05:26:46.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T10:38:14.423Z","etag":null,"topics":["active","context","mobx","next","react","redux","state"],"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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-20T13:10:33.000Z","updated_at":"2021-09-07T05:26:49.000Z","dependencies_parsed_at":"2022-08-24T14:59:32.190Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/next-react-active-state","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-react-active-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-react-active-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-react-active-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-react-active-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-react-active-state/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709935,"owners_count":20821298,"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":["active","context","mobx","next","react","redux","state"],"created_at":"2024-10-02T14:43:58.611Z","updated_at":"2026-04-16T12:38:44.480Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","readme":"# next-react-active-state\n\u003e Active state special for react based on next-active-state.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-react-active-state\n```\n\n## apis\n| api   | params | description                       |\n| ----- | ------ | --------------------------------- |\n| build | -      | Get state and sync event handler. |\n\n## usage\n```js\nimport NxReactActiveState from '@jswork/next-react-active-state';\nimport useForceUpdate from '@jswork/use-force-update';\n\nconst forceUpdate = useForceUpdate();\nconst {\n  current: { state, sync },\n} = useRef(\n  NxReactActiveState.build({}, () =\u003e {\n    console.log('changed main:', state);\n    forceUpdate();\n  })\n);\n\n\n\u003cform\u003e\n  \u003cdiv className=\"row\"\u003e\n    \u003clabel htmlFor=\"username\"\u003e username: \u003c/label\u003e\n    \u003cinput type=\"text\" name=\"username\" onChange={sync('username')} /\u003e\n  \u003c/div\u003e\n  \u003cdiv className=\"row\"\u003e\n    \u003clabel htmlFor=\"email\"\u003e email: \u003c/label\u003e\n    \u003cinput type=\"text\" name=\"email\" onChange={sync('email')}/\u003e\n  \u003c/div\u003e\n  \u003cdiv className=\"row\"\u003e\n    \u003clabel htmlFor=\"address\"\u003e email: \u003c/label\u003e\n    \u003cinput type=\"text\" name=\"formData[address]\" onChange={sync()}/\u003e\n  \u003c/div\u003e\n\u003c/form\u003e\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-react-active-state/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-react-active-state\n[version-url]: https://npmjs.org/package/@jswork/next-react-active-state\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-react-active-state\n[license-url]: https://github.com/afeiship/next-react-active-state/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-react-active-state\n[size-url]: https://github.com/afeiship/next-react-active-state/blob/master/dist/next-react-active-state.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-react-active-state\n[download-url]: https://www.npmjs.com/package/@jswork/next-react-active-state\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-react-active-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-react-active-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-react-active-state/lists"}