{"id":18836732,"url":"https://github.com/lucasmrdt/react-nedux","last_synced_at":"2026-05-08T04:49:59.243Z","repository":{"id":36467963,"uuid":"226209129","full_name":"lucasmrdt/react-nedux","owner":"lucasmrdt","description":"🧲 React provider of nedux - the next react-redux","archived":false,"fork":false,"pushed_at":"2023-01-05T02:27:42.000Z","size":637,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T12:17:05.861Z","etag":null,"topics":["nedux","nedux-provider","react","react-nedux","react-state-management","react-store","state-management","typescript"],"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/lucasmrdt.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-12-05T23:47:23.000Z","updated_at":"2020-06-24T07:18:14.000Z","dependencies_parsed_at":"2023-01-17T01:45:54.294Z","dependency_job_id":null,"html_url":"https://github.com/lucasmrdt/react-nedux","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/lucasmrdt%2Freact-nedux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmrdt%2Freact-nedux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmrdt%2Freact-nedux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmrdt%2Freact-nedux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasmrdt","download_url":"https://codeload.github.com/lucasmrdt/react-nedux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774326,"owners_count":19694700,"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":["nedux","nedux-provider","react","react-nedux","react-state-management","react-store","state-management","typescript"],"created_at":"2024-11-08T02:31:43.153Z","updated_at":"2026-01-27T21:30:15.137Z","avatar_url":"https://github.com/lucasmrdt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React-Nedux - The `n`ext react-r`edux`\n\n![typescript](https://img.shields.io/badge/-typescript-blueviolet) [![version](https://img.shields.io/badge/version-beta-blue)](https://www.npmjs.com/package/react-nedux) [![size](https://img.shields.io/bundlephobia/minzip/react-nedux?color=green\u0026label=size)](https://www.npmjs.com/package/react-nedux)\n\n\u003e The official React bindings for [nedux](https://github.com/lucasmrdt/nedux). Performant and flexible.\n\n## 📦 Installation\n\n```bash\nnpm install react-nedux --save\n```\n\n## 💻 Usage with examples\n\n|     Name     |                                         Source                                         |                                              Codesandbox                                              |\n| :----------: | :------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------: |\n| ✅ Todo List |         [here](https://github.com/lucasmrdt/nedux/tree/master/examples/todos)          |      [here](https://codesandbox.io/s/nedux-todos-nm8j0?fontsize=14\u0026hidenavigation=1\u0026theme=dark)       |\n|  🎛 Counter   | [here](https://github.com/lucasmrdt/nedux/tree/master/examples/counter-nedux-vs-redux) | [here](https://codesandbox.io/s/counter-nedux-vs-redux-n34b2?fontsize=14\u0026hidenavigation=1\u0026theme=dark) |\n\n## 📜 Documentation\n\n### `Import`\n\n```javascript\n// ES6\nimport { createStoreHook } from 'react-nedux';\n\n// ES5\nvar createStoreHook = require('react-nedux').createStoreHook;\n```\n\n### `createStoreHook(store)`\n\nCreates a Nedux hook with the same usage of [useState](https://reactjs.org/docs/hooks-reference.html#usestate).\n\n| argument | required |                       type                        | description                                                                                                 |\n| :------: | :------: | :-----------------------------------------------: | :---------------------------------------------------------------------------------------------------------- |\n| `store`  |    ✅    | [Store](https://github.com/lucasmrdt/nedux#store) | The store created by [createStore](https://github.com/lucasmrdt/nedux#createstoreinitialstate-middlewares). |\n\n### `useStore`\n\nThe `useStore` hook created by `createStoreHook` can be used as same as [useState](https://reactjs.org/docs/hooks-reference.html#usestate).\n\n## 🎛 Basic Usage\n\n\u003e Feel free to test it [here](https://codesandbox.io/s/condescending-butterfly-u9lnf?fontsize=14\u0026hidenavigation=1\u0026theme=dark).\n\n```tsx\nimport * as React from 'react';\nimport { render } from 'react-dom';\nimport { createStore } from 'nedux';\nimport { createStoreHook } from 'react-nedux';\n\nconst store = createStore({\n  counter: 0,\n});\n\nconst useStore = createStoreHook(store);\n\nconst increment = () =\u003e store.set('counter', prev =\u003e prev + 1);\nconst decrement = () =\u003e store.set('counter', prev =\u003e prev - 1);\n\nconst App = () =\u003e {\n  const [counter] = useStore('counter');\n\n  return (\n    \u003cspan\u003e\n      \u003cp\u003eyou've clicked {counter} times\u003c/p\u003e\n      \u003cbutton onClick={increment}\u003e+\u003c/button\u003e\n      \u003cbutton onClick={decrement}\u003e-\u003c/button\u003e\n    \u003c/span\u003e\n  );\n};\n\nconst rootElement = document.getElementById('root');\nrender(\u003cApp /\u003e, rootElement);\n```\n\n## 🙋🏼 Contributions\n\nAll [Pull Requests](https://github.com/lucasmrdt/react-nedux/compare?expand=1), [Issues](https://github.com/lucasmrdt/react-nedux/issues) and [Discussions](https://github.com/lucasmrdt/react-nedux/issues) are welcomed !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasmrdt%2Freact-nedux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasmrdt%2Freact-nedux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasmrdt%2Freact-nedux/lists"}