{"id":25591432,"url":"https://github.com/atlj/react-native-reuix","last_synced_at":"2025-06-10T20:35:34.502Z","repository":{"id":65522204,"uuid":"484156526","full_name":"atlj/react-native-reuix","owner":"atlj","description":"A redux-like store system for React Native Reanimated 2 shared values","archived":false,"fork":false,"pushed_at":"2022-04-21T19:48:16.000Z","size":424,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T04:59:45.487Z","etag":null,"topics":["npm-package","react","react-native","reanimated2","redux","redux-toolkit","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-reuix","language":"Java","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/atlj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-21T18:08:07.000Z","updated_at":"2022-06-10T14:21:56.000Z","dependencies_parsed_at":"2023-01-27T06:00:49.049Z","dependency_job_id":null,"html_url":"https://github.com/atlj/react-native-reuix","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlj%2Freact-native-reuix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlj%2Freact-native-reuix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlj%2Freact-native-reuix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlj%2Freact-native-reuix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atlj","download_url":"https://codeload.github.com/atlj/react-native-reuix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643906,"owners_count":21138526,"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":["npm-package","react","react-native","reanimated2","redux","redux-toolkit","typescript"],"created_at":"2025-02-21T09:51:22.288Z","updated_at":"2025-04-12T23:20:26.747Z","avatar_url":"https://github.com/atlj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-reuix\n\nA [redux](https://github.com/reduxjs/redux)-like store system for React Native Reanimated 2 shared values\n\n## Prerequisites\n\nThis module needs\n\n[React Native Reanimated 2](https://docs.swmansion.com/react-native-reanimated/docs) to work, first make sure you have this package installed\n\n## Installation\n\n### Using Yarn\n\n```sh\nyarn add react-native-reuix\n```\n### Using npm\n\n```sh\nnpm install react-native-reuix\n```\n\n\n## Usage\n\n### 1. Create a Store\n\n```ts\nexport const sharedValueStore = createSharedValueStore({\n  initialState: {\n    testOpacity: 0.5,\n  },\n  actions: {\n    setTestOpacity(state, payload: number) {\n      state.testOpacity = payload;\n    },\n  },\n});\n```\n\n### 2. Wrap Your App With SharedValueStoreProvider and Pass Your Store\n\n```tsx\nexport default function App() {\n  return (\n    \u003cSharedValueStoreProvider store={sharedValueStore}\u003e\n      \u003cTestView /\u003e\n    \u003c/SharedValueStoreProvider\u003e\n  );\n}\n```\n\n### 3. Read Values From Store\n\nGet the store using useSharedValueStore hook\n\n```ts\nconst sharedValueStore = useSharedValueStore\u003cTestStoreType\u003e();\n```\n\nThen you can freely read values from store\n\n```ts\nsharedValueStore.value.testOpacity\n```\n\n### 4. Dispatch Actions to Change Values\n\nGet the dispatcher using useSharedValueDispatch hook\n\n```ts\nconst sharedValueDispatch = useSharedValueDispatch\u003cTestStoreType\u003e();\n```\n\nDispatch actions to change values\n\n```ts\nsharedValueDispatch('setTestOpacity', 1);\n```\n\n## Rest\n\nRest of the docs are coming soon\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlj%2Freact-native-reuix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlj%2Freact-native-reuix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlj%2Freact-native-reuix/lists"}