Unable to integrate stenciljs component in React application

偶尔善良 提交于 2021-02-08 06:37:02

问题


I am trying to integrate the web component built using StencilJS but I get the following error.

Uncaught (in promise) TypeError: Cannot read property 'isProxied' of undefined
    at initializeComponent

ReactJS, index.js file =>

import {defineCustomElements} from 'my-modal/loader';
defineCustomElements(window);

StencilJS component:

import { Component, Prop, h } from '@stencil/core';

@Component({
  tag: 'my-component',
  styleUrl: 'my-component.css',
  shadow: true
})
export class MyComponent {
  @Prop() first: string;

  render() {
    return <div>Hello, World! I'm {this.first} <hr />
    </div>;
  }
}

Any thoughts ? :)

来源:https://stackoverflow.com/questions/58078580/unable-to-integrate-stenciljs-component-in-react-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!