{"id":13660844,"url":"https://github.com/today-/effector-react-inject","last_synced_at":"2025-11-01T02:30:30.394Z","repository":{"id":57219820,"uuid":"173911967","full_name":"today-/effector-react-inject","owner":"today-","description":"Inject Effector's state to React components simple way","archived":false,"fork":false,"pushed_at":"2023-03-02T20:14:41.000Z","size":32,"stargazers_count":11,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-11T20:40:50.140Z","etag":null,"topics":["decorator","effector","react"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/today-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-03-05T09:03:31.000Z","updated_at":"2020-02-14T06:13:26.000Z","dependencies_parsed_at":"2024-01-13T03:01:00.338Z","dependency_job_id":"e761266a-fd9c-4170-8183-a53530bb25db","html_url":"https://github.com/today-/effector-react-inject","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"804f62e92fa48ba803cb604e7732b2c695532d73"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/today-%2Feffector-react-inject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/today-%2Feffector-react-inject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/today-%2Feffector-react-inject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/today-%2Feffector-react-inject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/today-","download_url":"https://codeload.github.com/today-/effector-react-inject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239120207,"owners_count":19584980,"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":["decorator","effector","react"],"created_at":"2024-08-02T05:01:26.497Z","updated_at":"2025-11-01T02:30:30.344Z","avatar_url":"https://github.com/today-.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Packages"],"sub_categories":[],"readme":"# Effector-react-inject\n\nInject [Effector](https://github.com/zerobias/effector)'s state to React components simple way\n\n## Usage\n\n#### Connecting to React components\n\n```jsx harmony\n\nexport const Todos = inject({ todos, user })(TodoList);\n```\n\n`TodoList` component then will receive `todos` and `user` props with state from `todos` and `user` effector stores respectively.\n\n#### Connecting to React class components using decorators\n\n```jsx harmony\n@inject({ todos, user })\nexport class TodoList extends React.Component {\n```\n\n[Babel decorators](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy)\n\n[TypeScript decorators](https://www.typescriptlang.org/docs/handbook/decorators.html)\n\n#### TypeScript declarations\n\n```typescript jsx\nimport { inject, Injected } from 'effector-react-inject';\n\nconst stores = { todos, user };\n\ntype TodoListProps = OwnProps \u0026 Injected\u003ctypeof stores\u003e;\n\nclass TodoList extends React.Component\u003cTodoListProps\u003e {\n```\n\n### Motivation\n\n- Classic `redux-connect`-like HOC syntax, can be easily composed.\n\n- Less dependent on Effector's core API, especially if injecting multiple stores.\n\n- Can be used as a decorator for React class components\n\n- Wrappable components can be tested separately\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoday-%2Feffector-react-inject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoday-%2Feffector-react-inject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoday-%2Feffector-react-inject/lists"}