We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
props
Whne using the WebComponentWrapper and setting the props property this does not appear to set the value into the web element component.
[props]={ 'user': 'test'} However when checking for the property in a React component the value is null. Has anyone else experienced the same issue.
class ReactMfe extends HTMLElement { connectedCallback() { const mountPoint = document.createElement('div'); this.attachShadow({ mode: 'open' }).appendChild(mountPoint); const user = this.getAttribute('user'); console.log('🚀 ~ file: app.tsx: ~ user:', user) const root = ReactDOM.createRoot(mountPoint as HTMLElement); root.render(); } }
customElements.define('caracal-admin', ReactMfe);
The text was updated successfully, but these errors were encountered:
Maybe you should try accessing this.user from within the ReactMfe class. You are passing properties, not attributes.
Sorry, something went wrong.
Super thank you yes that worked. There doesnt seem to be any good examples of using the props with the wrapper. Thanks again
No branches or pull requests
Whne using the WebComponentWrapper and setting the
props
property this does not appear to set the value into the web element component.class ReactMfe extends HTMLElement {
connectedCallback() {
const mountPoint = document.createElement('div');
this.attachShadow({ mode: 'open' }).appendChild(mountPoint);
const user = this.getAttribute('user');
console.log('🚀 ~ file: app.tsx: ~ user:', user)
const root = ReactDOM.createRoot(mountPoint as HTMLElement);
root.render();
}
}
customElements.define('caracal-admin', ReactMfe);
The text was updated successfully, but these errors were encountered: