{"id":19341657,"url":"https://github.com/logux/redux","last_synced_at":"2025-04-06T12:07:35.147Z","repository":{"id":46009427,"uuid":"85834716","full_name":"logux/redux","owner":"logux","description":"Redux compatible API for Logux","archived":false,"fork":false,"pushed_at":"2024-08-06T00:04:43.000Z","size":2192,"stargazers_count":127,"open_issues_count":2,"forks_count":16,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-30T11:06:31.242Z","etag":null,"topics":["logux","redux"],"latest_commit_sha":null,"homepage":"https://logux.org/","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/logux.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-22T14:03:09.000Z","updated_at":"2024-08-06T00:04:46.000Z","dependencies_parsed_at":"2024-06-19T13:20:56.076Z","dependency_job_id":"78d15c53-e827-4669-a3d6-12d6af650bdd","html_url":"https://github.com/logux/redux","commit_stats":{"total_commits":382,"total_committers":10,"mean_commits":38.2,"dds":0.06282722513089001,"last_synced_commit":"37bce0aabebd89e5dea3bc664bc4a8ad7a9e9dc5"},"previous_names":["logux/logux-redux"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Fredux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Fredux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Fredux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Fredux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logux","download_url":"https://codeload.github.com/logux/redux/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478318,"owners_count":20945266,"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":["logux","redux"],"created_at":"2024-11-10T03:31:56.802Z","updated_at":"2025-04-06T12:07:35.127Z","avatar_url":"https://github.com/logux.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logux Redux\n\n\u003cimg align=\"right\" width=\"95\" height=\"148\" title=\"Logux logotype\"\n     src=\"https://logux.org/branding/logotype.svg\"\u003e\n\nLogux is a new way to connect client and server. Instead of sending\nHTTP requests (e.g., AJAX and GraphQL) it synchronizes log of operations\nbetween client, server, and other clients.\n\n* **[Guide, recipes, and API](https://logux.org/)**\n* **[Issues](https://github.com/logux/logux/issues)**\n  and **[roadmap](https://github.com/orgs/logux/projects/1)**\n* **[Projects](https://logux.org/guide/architecture/parts/)**\n  inside Logux ecosystem\n\nThis repository contains Redux compatible API on top of [Logux Client].\n\n\u003ca href=\"https://evilmartians.com/?utm_source=logux-redux\"\u003e\n  \u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\"\n       alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\"\u003e\n\u003c/a\u003e\n\n[Logux Client]: https://github.com/logux/client\n\n## Install\n\n```sh\nnpm install @logux/core @logux/client @logux/redux redux\n```\n\n## Usage\n\nSee [documentation] for Logux API.\n\n```js\nimport { CrossTabClient, log } from '@logux/client'\nimport { createStoreCreator } from '@logux/redux'\n\nlet userId = document.querySelector('meta[name=user]').content\nlet token = document.querySelector('meta[name=token]').content\n\nconst client = new CrossTabClient({\n  subprotocol: '1.0.0',\n  server: 'wss://example.com:1337',\n  userId,\n  token\n})\n\nconst createStore = createStoreCreator(client)\n\nconst store = createStore(reducers, preloadedState)\nlog(store.client)\n\nexport default store\n```\n\n```js\nimport { Provider } from 'react-redux'\nimport ReactDOM from 'react-dom'\n\nimport store from './store'\nimport App from './App'\n\nReactDOM.render(\n  \u003cProvider store={store}\u003e\u003cApp /\u003e\u003c/Provider\u003e,\n  document.getElementById('root')\n)\n```\n\n```js\nimport { useSubscription } from '@logux/redux'\n\nexport const User = ({ id, name }) =\u003e {\n  const isSubscribing = useSubscription([`user/${ id }`])\n  if (isSubscribing) {\n    return \u003cLoader /\u003e\n  } else {\n    return \u003ch1\u003e{ name }\u003c/h1\u003e\n  }\n}\n```\n\n[documentation]: https://logux.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogux%2Fredux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogux%2Fredux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogux%2Fredux/lists"}