{"id":17353175,"url":"https://github.com/a-gambit/focal-redux","last_synced_at":"2025-10-05T10:37:05.375Z","repository":{"id":57159089,"uuid":"96015940","full_name":"A-gambit/focal-redux","owner":"A-gambit","description":"Focal + Redux = ❤️","archived":false,"fork":false,"pushed_at":"2017-07-02T14:17:30.000Z","size":78,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T09:36:21.085Z","etag":null,"topics":["focal","javascript","react","redux"],"latest_commit_sha":null,"homepage":null,"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/A-gambit.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":"2017-07-02T10:21:46.000Z","updated_at":"2018-11-30T21:14:49.000Z","dependencies_parsed_at":"2022-09-07T20:11:49.658Z","dependency_job_id":null,"html_url":"https://github.com/A-gambit/focal-redux","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/A-gambit%2Ffocal-redux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-gambit%2Ffocal-redux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-gambit%2Ffocal-redux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-gambit%2Ffocal-redux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/A-gambit","download_url":"https://codeload.github.com/A-gambit/focal-redux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961810,"owners_count":21190083,"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":["focal","javascript","react","redux"],"created_at":"2024-10-15T17:15:51.197Z","updated_at":"2025-10-05T10:37:00.328Z","avatar_url":"https://github.com/A-gambit.png","language":"TypeScript","readme":"# Focal-Redux\n\n\n[![npm Version](https://img.shields.io/npm/v/focal-redux.svg)](https://www.npmjs.com/package/focal-redux) ![License](https://img.shields.io/npm/l/focal-redux.svg)\n[![Build Status](https://travis-ci.org/A-gambit/focal-redux.svg?branch=master)](https://travis-ci.org/A-gambit/focal-redux)\n\n`Focal-Redux` allows you to use all the power of [Focal](https://github.com/grammarly/focal) in a Redux application.\nIt helps you to implement Focal's `Atom` in the Redux application by simplifying the code refactoring when you want to switch from Redux to Focal.\nFuthermore, you can use all the advantages of both state-management in your application.\nFor example, Focal can help you with large collections of data or form management, and so on.\n\n### Installation\n\n```sh\n$ yarn add focal-redux\n```\n\nor\n\n```sh\n$ npm install --save focal-redux\n```\n\n### Usage\n\n#### First Step\n\nYou should wrap your `Reducer` or `ReducersMapObject` with `subscribeAtom` function.\nThis function will automaticaly add action `@@UPDATE_STORE@@` which will be dispatched when your atom updates.\n\n```js\nimport {subscribeStore} from 'focal-redux'\n\n// Reducer:\nsubscribeAtom(reducer)\n\n// ReducersMapObject\ncombineReducer(subscribeAtom({ //reducers }))\n```\n\n#### First Step\n\nYou should subscribe your atom to store using `subscribeStore` function:\n\n```js\nsubscribeStore(atom, store)\n```\n\n### NPM scripts\n\n- `npm start`: Runs `npm run build` in watch mode\n- `npm run test`: Run test suite\n- `npm run test:watch`: Run test suite in [interactive watch mode](http://facebook.github.io/jest/docs/cli.html#watch)\n- `npm run build`: Generage bundles and typings\n- `npm run lint`: Lints code\n\n### Contributing\n\nIf you think that we are missing any key features, please open a GitHub issue, or even better, a pull request. Any feedback you have about using `focal-redux` would be greatly appreciated.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-gambit%2Ffocal-redux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-gambit%2Ffocal-redux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-gambit%2Ffocal-redux/lists"}