All Projects → tur-nr → Polymer Redux

tur-nr / Polymer Redux

Licence: mit
Polymer bindings for Redux.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Polymer Redux

Vaadin Upload
The Web Component for uploading multiple files with progress indication. Part of the Vaadin components.
Stars: ✭ 87 (-80.67%)
Mutual labels:  polymer, web-component
Vidyano
Vidyano Web²
Stars: ✭ 29 (-93.56%)
Mutual labels:  web-component, polymer
Vaadin Combo Box
The Web Component for displaying a list of items with filtering. Part of the Vaadin components.
Stars: ✭ 113 (-74.89%)
Mutual labels:  polymer, web-component
Vaadin Form Layout
The Web Component providing configurable responsive layout for form elements. Part of the Vaadin components.
Stars: ✭ 15 (-96.67%)
Mutual labels:  polymer, web-component
polymer-linter
Moved to Polymer/tools monorepo
Stars: ✭ 34 (-92.44%)
Mutual labels:  web-component, polymer
Geo Location
Web component element for the Geolocation API
Stars: ✭ 86 (-80.89%)
Mutual labels:  polymer, web-component
resizable-panels
Web Component that allows to resize its childrens vertically or horizontally
Stars: ✭ 18 (-96%)
Mutual labels:  web-component, polymer
Vaadin Charts
Vaadin Charts is a feature-rich interactive graph library that answers the data visualization needs of modern web applications
Stars: ✭ 47 (-89.56%)
Mutual labels:  polymer, web-component
vaadin-split-layout
The Web Component which allows you to partition a layout into resizeable areas. Part of the Vaadin components.
Stars: ✭ 40 (-91.11%)
Mutual labels:  web-component, polymer
paper-countries
Select Dropdown with list of countries with flags and autocomplete
Stars: ✭ 16 (-96.44%)
Mutual labels:  web-component, polymer
Paper Timezone
Polymer based timezone selection component
Stars: ✭ 19 (-95.78%)
Mutual labels:  polymer, web-component
vaadin-icons
Vaadin Icons is a collection of 600+ unique icons designed for web applications
Stars: ✭ 59 (-86.89%)
Mutual labels:  web-component, polymer
Vaadin Date Picker
The Web Component providing a date selection field with scrollable month calendar. Part of the Vaadin components.
Stars: ✭ 158 (-64.89%)
Mutual labels:  polymer, web-component
vaadin-dialog
High quality web component for modal dialogs. Part of the Vaadin platform.
Stars: ✭ 15 (-96.67%)
Mutual labels:  web-component, polymer
bwt-datatable
Data table with Polymer 3 support!
Stars: ✭ 43 (-90.44%)
Mutual labels:  web-component, polymer
vaadin-text-field
The themable Web Component providing input controls. Part of the Vaadin components.
Stars: ✭ 29 (-93.56%)
Mutual labels:  web-component, polymer
Lwjgl3
LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan), audio (OpenAL), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR) applications.
Stars: ✭ 3,540 (+686.67%)
Mutual labels:  bindings
Web Components Todo
A simple todo list built with various Web Components technologies
Stars: ✭ 368 (-18.22%)
Mutual labels:  polymer
Bs Webapi Incubator
BuckleScript bindings to the DOM and other Web APIs
Stars: ✭ 297 (-34%)
Mutual labels:  bindings
Macdriver
Native Mac APIs for Go
Stars: ✭ 3,582 (+696%)
Mutual labels:  bindings

Polymer Redux

Build Status Coverage Status

Polymer bindings for Redux. Bind store state to properties and dispatch actions from within Polymer Elements.

Polymer is a modern library for creating Web Components within an application. Redux is a state container for managing predictable data. Binding the two libraries together allows developers to create powerful and complex applications faster and simpler. This approach allows the components you build with Polymer to be more focused on functionality than the applications state.

Polymer 3

Polymer 3 is currently under beta release, checkout: https://github.com/tur-nr/polymer-redux/tree/dev/v2.x

Installation

bower install --save polymer-redux

Example

// Create a Redux store
const store = Redux.createStore((state = {}, action) => state)

// Create the PolymerRedux mixin
const ReduxMixin = PolymerRedux(store)

// Bind Elements using the mixin
class MyElement extends ReduxMixin(Polymer.Element) {
    static get is() {
        return 'my-element'
    }

    connectedCallback() {
        super.connectedCallback();
        const state = this.getState();
    }
}

// Define your Element
customElements.define(MyElement.is, MyElement)

Now MyElement has a connection to the Redux store and can bind properties to it's state and dispatch actions.

Documentation

See the documentation page: https://tur-nr.github.io/polymer-redux/docs.

API

PolymerRedux

new PolymerRedux(<store>)
  • store Object, Redux store.

Returns a ReduxMixin function.

Redux Mixin

These methods are available on the instance of the component, the element.

#getState()

Returns current store's state.

#dispatch(<name>, [args, ...])
  • name String, action name in the actions list.
  • arg... *, Arguments to pass to action function.

Returns the action object.

#dispatch(<fn>)
  • fn Function, Redux middleware dispatch function.

Returns the action object.

#dispatch(<action>)
  • action Object, the action object.

Returns the action object.

Events

state-changed

Fires when the store's state has changed.

License

MIT

Copyright (c) 2017 Christopher Turner

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].