{"id":14990293,"url":"https://github.com/tur-nr/polymer-redux","last_synced_at":"2025-05-16T05:04:59.224Z","repository":{"id":3019745,"uuid":"43003744","full_name":"tur-nr/polymer-redux","owner":"tur-nr","description":"Polymer bindings for Redux.","archived":false,"fork":false,"pushed_at":"2022-12-07T01:05:09.000Z","size":1708,"stargazers_count":440,"open_issues_count":41,"forks_count":67,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-08T17:57:30.819Z","etag":null,"topics":["bindings","polymer","redux","web-component"],"latest_commit_sha":null,"homepage":"https://tur-nr.github.io/polymer-redux","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/tur-nr.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":"2015-09-23T13:49:30.000Z","updated_at":"2024-06-29T15:57:12.000Z","dependencies_parsed_at":"2022-08-06T13:00:45.239Z","dependency_job_id":null,"html_url":"https://github.com/tur-nr/polymer-redux","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tur-nr%2Fpolymer-redux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tur-nr%2Fpolymer-redux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tur-nr%2Fpolymer-redux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tur-nr%2Fpolymer-redux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tur-nr","download_url":"https://codeload.github.com/tur-nr/polymer-redux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"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":["bindings","polymer","redux","web-component"],"created_at":"2024-09-24T14:19:50.679Z","updated_at":"2025-05-16T05:04:59.198Z","avatar_url":"https://github.com/tur-nr.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Marks","Behaviors"],"sub_categories":["[Polymer - Build modern apps using web components](https://www.polymer-project.org)","🌎 [Polymer - Build modern apps using web components](www.polymer-project.org)"],"readme":"# Polymer Redux\n\n[![Build Status](https://travis-ci.org/tur-nr/polymer-redux.svg?branch=master)](https://travis-ci.org/tur-nr/polymer-redux)\n[![Coverage Status](https://coveralls.io/repos/github/tur-nr/polymer-redux/badge.svg?branch=master)](https://coveralls.io/github/tur-nr/polymer-redux?branch=master)\n\nPolymer bindings for Redux. Bind store state to properties and dispatch\nactions from within Polymer Elements.\n\nPolymer is a modern library for creating Web Components within an application.\nRedux is a state container for managing predictable data. Binding the two\nlibraries together allows developers to create powerful and complex\napplications faster and simpler. This approach allows the components you build\nwith Polymer to be more focused on functionality than the applications state.\n\n## Polymer 3\n\nPolymer 3 is currently under beta release, checkout: https://github.com/tur-nr/polymer-redux/tree/dev/v2.x\n\n## Installation\n\n```bash\nbower install --save polymer-redux\n```\n\n## Example\n\n```javascript\n// Create a Redux store\nconst store = Redux.createStore((state = {}, action) =\u003e state)\n\n// Create the PolymerRedux mixin\nconst ReduxMixin = PolymerRedux(store)\n\n// Bind Elements using the mixin\nclass MyElement extends ReduxMixin(Polymer.Element) {\n    static get is() {\n        return 'my-element'\n    }\n\n    connectedCallback() {\n        super.connectedCallback();\n        const state = this.getState();\n    }\n}\n\n// Define your Element\ncustomElements.define(MyElement.is, MyElement)\n```\n\nNow `MyElement` has a connection to the Redux store and can bind properties to\nit's state and dispatch actions.\n\n## Documentation\n\nSee the documentation page: [https://tur-nr.github.io/polymer-redux/docs](https://tur-nr.github.io/polymer-redux/docs).\n\n## API\n\n#### PolymerRedux\n\n##### `new PolymerRedux(\u003cstore\u003e)`\n\n* `store` Object, Redux store.\n\nReturns a `ReduxMixin` function.\n\n#### Redux Mixin\n\nThese methods are available on the instance of the component, the element.\n\n##### `#getState()`\n\nReturns current store's state.\n\n##### `#dispatch(\u003cname\u003e, [args, ...])`\n\n* `name` String, action name in the actions list.\n* `arg...` *, Arguments to pass to action function.\n\nReturns the action object.\n\n\n##### `#dispatch(\u003cfn\u003e)`\n\n* `fn` Function, Redux middleware dispatch function.\n\nReturns the action object.\n\n\n##### `#dispatch(\u003caction\u003e)`\n\n* `action` Object, the action object.\n\nReturns the action object.\n\n\n#### Events\n\n##### `state-changed`\n\nFires when the store's state has changed.\n\n## License\n\n[MIT](LICENSE)\n\nCopyright (c) 2017 [Christopher Turner](https://github.com/tur-nr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftur-nr%2Fpolymer-redux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftur-nr%2Fpolymer-redux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftur-nr%2Fpolymer-redux/lists"}