Created
May 19, 2022 06:21
-
-
Save icsaba/7b4d3ba6c64fe00b6fd2d5b1e298465f to your computer and use it in GitHub Desktop.
code snippet for my medium article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyLitComponent extends LitElement { | |
static get properties() { | |
return { | |
somepropFromContext: { | |
type: Number, | |
fromContext: true | |
}, | |
renamedProp: { | |
type: String, | |
fromContext: true, | |
contextKey: 'somepropInTheStore' | |
} | |
}; | |
} | |
} | |
window.customElements.define('my-lit-component', context.connect(MyLitComponent)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment