From 7b439843d487278d3d2b728194c3e00317c057b2 Mon Sep 17 00:00:00 2001 From: Christopher Thorn Date: Thu, 2 Sep 2021 09:32:45 -0700 Subject: [PATCH] feat: thread through observedAttributes from the react component mimics the webcomponent static get observedAttributes interface on the react component, and threads through that value to the web component, since that's needed to be declared for attribute observation --- src/dev/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dev/index.js b/src/dev/index.js index 0417d48..013f42f 100644 --- a/src/dev/index.js +++ b/src/dev/index.js @@ -39,7 +39,13 @@ module.exports = { } } + const observedAttributes = app.type.observedAttributes; + const proto = class extends HTMLElement { + static get observedAttributes() { + return observedAttributes || []; + } + connectedCallback() { const webComponentInstance = this; let mountPoint = webComponentInstance;