matthewp / haunted

React's Hooks API implemented for web components 👻

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to pass a property and an observable attribute.

fwermus opened this issue · comments

I have tried with no success to pass an attribute and a property to a custom component. I can get active attribute, but not refresh property.

function DopplerForm({ active, refresh }) {
...
}

const properties = {
refresh: {type: Boolean},
};

App.observedAttributes = ['active'];

customElements.define("ql-xxx", component(DopplerForm, {properties, observedAttributes: ['active']}));