One can pass down properties to another LitElement
this way:
myRender(myParameter) {
return html`
<my-element-one .propertyOne=${myParameter.somePropertyOne}></my-element-one>
`;
}
I have dozens of properties that I need to pass to multiple elements.
myRenderOne(myParameter) {
return html`
<my-element-one
.propertyOne=${myParameter.somePropertyOne}>
.propertyTwo=${myParameter.somePropertyTwo}>
...
.propertyHundred=${myParameter.somePropertyHundred}>
</my-element-one>
`;
}
myRenderTwo(myParameter) {
return html`
<my-element-two
.propertyFive=${myParameter.somePropertyFive}>
.propertySix=${myParameter.somePropertySix}>
...
.propertyFifty=${myParameter.somePropertyFifty}>
</my-element-two>
`;
}
How can I pass common properties without duplicating dozens of lines of code?